Solved

Bringing custom data into Google analytics

Posted on 2014-10-30
4
132 Views
Last Modified: 2016-02-24
<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.
0
Comment
Question by:smuralisankar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 17

Accepted Solution

by:
Lucas Bishop earned 500 total points
ID: 40441491
Based on the unique url you generate for each sign-up, it appears the "account=testcompanyname1" is ultimately the closest thing you have to a unique order id. Basically each company that signs up with you, uses a unique "account" id.

Before recommending on how to pass this into GA, what exactly is your goal in tracking this? Are you simply trying to track that a conversion took place when this unique URL is generated? i
0
 

Author Comment

by:smuralisankar
ID: 40441507
If this unique ID is there as a custom variable, then I can include this in several reports
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question