Link to home
Start Free TrialLog in
Avatar of smuralisankar
smuralisankar

asked on

Bringing custom data into Google analytics

<script type="text/javascript">
$(document).ready(function(){
var fullstring = getParameterByName("redirect");
var subdomainarray = fullstring.split("/");
var sub_domain_url = subdomainarray[2];
var img_hit = '<iframe src="http://4520586.fls.doubleclick.net/activityi;src=4520586;type=Freet0;cat=FreeT0;qty=1;u1=['+sub_domain_url+'];cost=[Revenue];ord=[OrderID]?" width="1" height="1" frameborder="0" style="display:none"></iframe>';
$("#doubleclick_img_pixel").append(img_hit);
});
</script>
<div id="doubleclick_img_pixel"></div>

Open in new window


We are using DFA / DCM (Doubleclick for advertisers / Doubleclick campaign manager) as our adserver. We need to passback a unique ID for each conversion that we get.

We don't generate an order ID or transaction ID for each signup but we do generate a unique thank you page URL for each signup.

This is the thank you page where we would have the DFA conversion tag:
freshdesk.com/signup/thank-you

This is the unique thank you page URL that would be generated for each signup (This is just for one account):
http://freshdesk.com/signup/thank-you?redirect=http%3A%2F%2Ftestcompanyname1.freshdesk.com%2Fsignup_complete%2FndPAXFOfs7TEYnbE5WsC&account=testcompanyname1

The javascript code snippet that I posted would work on this URL.

So, in DFA we created a custom variable and pushed this data in. Atleast that is what our webmaster told us.

So, how do we push this data into Google analytics (universal) as a custom variable / custom dimension.
ASKER CERTIFIED SOLUTION
Avatar of Lucas Bishop
Lucas Bishop
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of smuralisankar
smuralisankar

ASKER

If this unique ID is there as a custom variable, then I can include this in several reports