Rich-text Reply

GA integration for custom API

ksearch 08-15-16

GA integration for custom API

Hi. I am looking to integrate GA tracking to my Optimizely project but my client has a custom tracking API. Any idea what code to add in and where? Thanks

Level 2

MartijnSch 08-16-16
 

Re: GA integration for custom API

Hi Ksearch,

Depends a bit what you mean with the custom tracking API that your client is using. What I could imagine is that you're using the Optimizely JS API to figure out what experiment + variant is being shown to the user and that you send this information via JS or in another way to the custom tracking API of your client. But I'm not sure if that is what you're looking for?

Martijn.
ksearch 08-16-16
 

Re: GA integration for custom API

Hi Martijn,

Sorry, I meant that their Google Analytics tracking is custom so it does not fit into the Universal Analytics or Classic Analytics options.
var appConfig = {
googleApiKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
googleAnalyticsAccountId: "UA-XXXXXXX-X",

cookiePolicyCookieName: "IsAgreeToCookiePolicy",
cookiePolicyShowEffect: "fade",
cookiePolicyHideEffect: "fade",

require:{

baseUrl:"/assets/js/",
paths:{
"comps":"app/components",
"gmapapi":"//maps.googleapis.com/maps/api/js?key=AIzaSyCg1iOOGHxCvY7VTNtokgyhB7ZA0j777Vs&sensor=false&ext=js",
"async":"libs/require/async",
"gmap":"libs/gmap",
"plans":"app/plans"
}

},

viewport:{
responsiveChecking:true,
changeClasses:true
}
}
Level 2