WANTED: Simple step-by-step instructions on how to integrate DL Guard into Google Analytics Funnels!

0 replies
MODERATORS: Please don't remove this thread. I asked this same question at the DL Guard forum but no one responded because that forum isn't very active and the owner of DL Guard, Sam, specifically said he doesn't use Google Analytics so doesn't know how to do this. Thank you.


I want to set up funnels in Google Analytics with the php links DL Guard generates. (DL Guard automatically generates a unique link for every customers Thank you/download page.)

Apparently if I use a link that looks like this http://www.MyWebsite.com/DLGuard/cbreturndefault.php Google Analytics won't be able to differentiate between Product A or Product B, C, etc. so the link must have some extra code tacked on to the end of it.

Here is the content from a 4 year old thread at DL Guard (that no one is replying to now) that talks about how to do this and is what I need clarification for...


I've had problems on getting Google Analytics goal and eCommerce tracking to play ball with DLG. Finally figured it out yesterday. Here's a simple tutorial incase someone else is struggling with this also.

GOALS

If you want Google Analytics to track sales you made using DLG as goals, here's how to do it.

  • Goal type: URL Destination
    Match type: Regular Expression Match
    Goal URL: /dlg/download.php\?r=.{1,17}&p=1$
    Goal value: Price of your product


In case the Goal URL looks mysterious let me briefly explain it. '?' is a special character used to match things and if we want to use it as normal '?' we have to escape, hence the '/' after php.

r=.{1,17} is used to match any receipt number. That expression matches any string that is 1 to 17 characters long. PayPal receipt numbers are 17 characters long, hence the 17 as max. In case your receipt numbers are longer just change the last number. This matches both PayPal and CB receipt numbers for me.

&p=1$ identifies your product number. So change the number to match the product number in DLG you want to track. The '$' at the end means that this has to be the end of the string. Without the '$' it would also match p=10/11/12/100 and so on.

You have to set a goal for each product you want to track.

ECOMMERCE TRACKING

Here's the code I used to eCommerce tracking. I have different thank you/download page templates for all of my products, so I just pasted this to the HTML template. I haven't tested pasting this to the 'Extra HTML' box.

Here's what you have to change:

Enter your own User Account ID. And remember to enter the one with your website profile, not the whole account code. Each of your website profiles has a different code. In the code below it's the -8 that denotes my website profile. So make sure your code also includes '-X'.

Change the price in the two instances below to match the price of your product.

That works for tracking digital info products that are sold one unit at a time. If you sell a different type of product you might need to make further changes to the code.

CODE:
<!-- Google Analytics eCommerce tracking script -->
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2707024-8']); // Insert User Account code here.
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'%%customerreceipt%%', // order ID - required
'', // affiliation or store name
'19.97', // total - required
'', // tax
'', // shipping
'', // city
'', // state or province
'' // country
]);

// add item might be called for every item in the shopping cart
// where your ecommerce engine loops through each item in the cart and
// prints out _addItem for each
_gaq.push(['_addItem',
'%%customerreceipt%%', // order ID - required
'%%productnumber%%', // SKU/code - required
'%%productname%%', // product name
'', // category or variation
'19.97', // unit price - required
'1' // quantity - required
]);
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google- analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
<!-- Google Analytics eCommerce tracking script -->


==============================================
Okay, back to my situation:

This is typical of how my DLG download/thank you page URL looks that I use for my Clickbank products:
http://www.MyWebsite.com/DLGuard/cbreturndefault.php

I'm not sure you need this, but if the product I'm selling through Clickbank is #22 then this is what the DLG URL I would use for my "Order Now" button would look like:
http://www.MyWebsite.com/DLGuard/sel...odData=cb%2C22

*The products sell for $49.95 and $69.95.


QUESTIONS PLEASE...

1) Based on the URL's I provided above, can someone show me exactly how the URL that I'll use in my Google Analytics funnel should look like please?

2) What should the code for the Google tracking script shown in the starting thread look like in my case?

3) And if you are familiar with the DLG Dashboard, should that same Google tracking script be placed at the bottom of the extra HTML box in my DLG dashboard for each of my products?

Thank you very much.
#analytics #funnels #google #guard #instructions #integrate #simple #stepbystep #wanted

Trending Topics