This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import time | |
from facebook_business.adobjects.serverside.event import Event | |
from facebook_business.adobjects.serverside.event_request import EventRequest | |
from facebook_business.adobjects.serverside.user_data import UserData | |
from facebook_business.adobjects.serverside.custom_data import CustomData | |
from facebook_business.adobjects.serverside.action_source import ActionSource | |
from facebook_business.api import FacebookAdsApi | |
access_token = '****************************************************************************************************' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | name | segment | state | city | |
---|---|---|---|---|---|
CG-12520 | Claire Gute | Consumer | Kentucky | Henderson | |
DV-13045 | Darrin Van Huff | Corporate | California | Los Angeles | |
SO-20335 | Sean O'Donnell | Consumer | Florida | Fort Lauderdale | |
BH-11710 | Brosina Hoffman | Consumer | California | Los Angeles | |
AA-10480 | Andrew Allen | Consumer | North Carolina | Concord | |
IM-15070 | Irene Maddox | Consumer | Washington | Seattle | |
HP-14815 | Harold Pawlan | Home Office | Texas | Fort Worth | |
PK-19075 | Pete Kriz | Consumer | Wisconsin | Madison | |
AG-10270 | Alejandro Grove | Consumer | Utah | West Jordan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | order_date | ship_mode | customer_id | sales | |
---|---|---|---|---|---|
100006 | 2014-09-07 | Standard | DK-13375 | 377.97 | |
100090 | 2014-07-08 | Standard | EB-13705 | 699.192 | |
100293 | 2014-03-14 | Standard | NF-18475 | 91.056 | |
100328 | 2014-01-28 | Standard | JC-15340 | 3.928 | |
100363 | 2014-04-08 | Standard | JM-15655 | 21.376 | |
100391 | 2014-05-25 | Standard | BW-11065 | 14.62 | |
100678 | 2014-04-18 | Standard | KM-16720 | 697.074 | |
100706 | 2014-12-16 | Second | LE-16810 | 129.44 | |
100762 | 2014-11-24 | Standard | NG-18355 | 508.62 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script> | |
(function(e){var c=0,d={},a=0,b={init:function(f){return this.each(function(){d=jQuery.extend({achieveTime:60,loop:0,eventList:"blur focus focusin focusout load resize scroll unload click dblclickmousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error",testPeriod:10,useMultiMode:1,callBack:function(g){console.log("Achieved!")},watchEvery:1,counter:{test:0,achiev:0}},f);d.watchEvery*=1000;if(d.useMultiMode){b.loadMultiData()}if(d.counter.achiev!=-1){e(this).bind(d.eventList,b.eventTrigger);b.process()}})},process:function(){d.counter.test+=1;if(d.counter.test==d.testPeriod){if(a){a=0;d.counter.achiev+=d.testPeriod}d.counter.test=0}c=setTimeout(b.process,d.watchEvery);if(d.counter.achiev>=d.achieveTime){if(!d.loop){clearTimeout(c)}d.counter.achiev=d.loop?0:-1;d.callBack.call(this,d)}if(d.useMultiMode){document.cookie="activity="+d.counter.test+"|"+d.counter |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function () { | |
return function(tracker) { | |
tracker.set('dimension1', tracker.get('clientId')); | |
var originalSendHitTask = tracker.get('sendHitTask'); | |
tracker.set('sendHitTask', function(model) { | |
originalSendHitTask(model); | |
var hitPayload = model.get('hitPayload'); | |
var cleanupKeys = ['_v', 'a', '_s', '_u', 'je', '_u', 'jid', 'gjid', '_gid', 'gtm', 'z', 'v', 'tid', '_r']; | |
var fbHitPayload = {}; | |
decodeURI(hitPayload).split('&').forEach(function(pair) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s) | |
{if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0]; | |
s.parentNode.insertBefore(t,s)}(window, document,'script', | |
'https://connect.facebook.net/en_US/fbevents.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!"rym" %in% installed.packages()[,1]){install.packages('rym')} | |
if(!"getProxy" %in% installed.packages()[,1]){install.packages('getProxy')} | |
library(rym) | |
library(getProxy) | |
my_token <- rym_auth() | |
dateFrom <- '2018-03-01' #Дата от | |
dateTo <- '2018-03-15' #Дата до |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install.package("googleAnalyticsR", dependencies = TRUE) | |
#install.packages("googleAuthR") | |
library(googleAnalyticsR)#Подключаем библиотеку googleAnalyticsR | |
library(googleAuthR)#Подключаем библиотеку googleAuthR | |
ga_auth() | |
dateFrom <- '2018-03-01' #С какого дня выгружать данные из GA | |
dateTo <- '2018-03-15' #По какой день выгружать данные из GA |