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
# Load Shiny | |
library(shiny) | |
# Define server logic required to request summary data from Adobe Analytics | |
shinyServer(function(input, output) { | |
# Load RSiteCatalyst | |
library("RSiteCatalyst") | |
# Listen for a click on the 'Get Report Suite Summary' button |
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
#import the pandas library | |
import pandas as pd | |
#pull adobe report download into a dataframe; ignorning the comment header | |
df = pd.read_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id.csv", comment="#", header=1) | |
#export cleaned data to a new csv file | |
df.to_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id_no-comments.csv", encoding='utf-8') |
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
/*YouTube Player updates required by Adobe Video Tracking module */ | |
var n=0; | |
jQuery('iframe').each(function() { | |
var src = jQuery(this).attr('src'); | |
if(src){ | |
if (src.indexOf('youtube.com') > -1) { | |
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
/* Media Module Config */ | |
s.enableVideoTracking=true | |
if(s.enableVideoTracking){ | |
s.loadModule('Media'); | |
s.Media.autoTrack=false; | |
s.Media.playerName='YouTube'; | |
s.Media.segmentByMilestones=true; | |
s.Media.trackMilestones='25,50,75'; | |
s.Media.trackUsingContextData=true; | |
s.Media.contextDataMapping = { |
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
/* Loads IFrame Player API Code asynchronously */ | |
var tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); |
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
/* YouTube Player Mapping (https://developers.google.com/youtube/iframe_api_reference) */ | |
var playerInfoList=new Array(); | |
$("[id^='player']").each(function(){ | |
var player=$(this).attr('id'); | |
playerInfoList.push(player); | |
}); | |
var players=new Array(); | |
window.onYouTubeIframeAPIReady = function() { | |
for(x=0;x<playerInfoList.length;x++){ | |
players[x] = new YT.Player(playerInfoList[x], { |
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
/* | |
* Media Module | |
*/ | |
function AppMeasurement_Module_Media(q){var | |
b=this;b.s=q;q=window;q.s_c_in||(q.s_c_il=[],q.s_c_in=0);b._il=q.s_c_il;b._in=q.s_c_in;b._il[b._in] | |
=b;q.s_c_in++;b._c="s_m";b.list=[];b.open=function(d,c,e,k){var f={},a=new Date,l="",g;c||(c=- | |
1);if(d&&e){b.list||(b.list={});b.list[d]&&b.close(d);k&&k.id&&(l=k.id);if(l)for(g in | |
b.list)!Object.prototype[g]&&b.list[g]&&b.list[g].R==l&&b.close(b.list[g].name);f.name=d;f.length=c | |
;f.offset=0;f.e=0;f.playerName=b.playerName?b.playerName:e;f.R=l;f.C=0;f.a=0;f.timestamp= | |
Math.floor(a.getTime()/1E3);f.k=0;f.u=f.timestamp;f.c=-1;f.n="";f.g=- |
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
/*YouTube Player updates required by Adobe Video Tracking module */ | |
var n=0; | |
jQuery('iframe').each(function() { | |
var src = jQuery(this).attr('src'); | |
if(src){ | |
if (src.indexOf('youtube.com') > -1) { | |
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
#import the pandas library | |
import pandas as pd | |
#pull adobe report download into a dataframe; ignorning the comment header | |
df = pd.read_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id.csv", comment="#", header=1) | |
#export cleaned data to a new csv file | |
df.to_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id_no-comments.csv", encoding='utf-8') |
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
for (var i = 0; i < dataLayer.transaction.item.length; i++) { | |
var payType = dataLayer.transaction.total.paymentMethods[i].paymentMethod; | |
switch(payType) { | |
case "CREDIT_CARD": | |
s.eVar45 = dataLayer.transaction.total.paymentMethods[i].paymentMethod; | |
s.events += ",event27"; | |
break; | |
case "PAYPAL": |
NewerOlder