Setting up Google Analytics with the DPD Storefront Cart System
DPD supports conversion tracking with Google Analytics. Both Storefront cart and instant checkout can be tracked with Google Analytics, and setup only takes a few minutes.
To do Google Analytics tracking with Storefront Carts you will need:
1. A Google Analytics account
2. A DPD Account
Step 1: Add your Google Analytics tracking code to the Storefront
First, you have to tell DPD what tracking code to display on your storefront cart and delivery pages.
1. Log in to DPD
2. Go to Products > Storefronts to open up your storefront list
3. Click "Storefront Options" to edit the storefront you want to track. If this is your first store it will be the default storefront
4. On the Main Options tab, enter your complete Google Analytics tracking code in the "Tracking HTML" field and save
5. Get your storefront ID:
To get your storefront ID, look at your "view cart / checkout" button code that you have pasted in to your site. The URL in this button code contains your storefront ID. Alternately, you can look at the page URL of your storefront options page for your store's unique Storefront ID:
Examples:
View Cart button code: http://www.digitalproductdelivery.com/cart/view/1234/remote/1 or http://www.digitalproductdelivery.com/cart/view/1234
DPD Storefront Options Page URL: http://www.digitalproductdelivery.com/storefront/edit/id/1234
In these examples, 1234 is the storefront ID. Note this number as you'll need it in a moment to set up Google Analytics to look for the right URL.
Step 2: Set up Google Analytics
In order to track conversions and create a goal funnel, you'll need to tell Google Analytics the URLs that would signal a completed sale.
6. Log in to Google Analytics
7. Open your sales site's profile
8. Click on Analytics Settings and edit the profile for your sales site
9. Under the Goals section, select "Add Goal" to create a new goal
10. Enter your goal name (for example, "Completed Sale"), set the goal to active and choose your goal position.
11. For Goal Type, choose "URL Destination"
12. Enter the following for Goal Details:
Match Type: Head Match
Goal URL: http://www.digitalproductdelivery.com/cart/deliver/1234/ where 1234 is YOUR STORE ID from #5 above
Case sensitive: No (unchecked)
Goal Value: The price of your product (for example, $19.95)
Advanced Option: Optionally, you can create a Goal Funnel to track cart abandonment. After adding all the URLs that customers will go through on your site BEFORE reaching the cart, Add a funnel URL and enter the following:
URL: /cart/view/1234 where 1234 is YOUR STORE ID from #5 above
Name: View Cart
Note: The /cart/view/ URL should be the last step in your goal funnel after all pages on your site.
13. Save the goal and you're done.
How this works:
All DPD delivery URLs follow a common structure:
http://www.digitalproductdelivery.com/cart/deliver/<STOREFRONT-ID>/purchase_id/<PURCHASE-ID>/salt/<UNIQUE-IDENTIFIER>
The portion of the URL in purple above will always be the same for your store. The Purchase ID and salt/unique identifier change for every purchase as an anti-theft and security feature.
By performing a Head Match on the http://www.digitalproductdelivery.com/cart/deliver/<STOREFRONT-ID>/ portion of the URL, Google Analytics will track every completed purchase, regardless of the purchase ID and unique identifier.