Tracking 3rd Party Shopping Carts

By Jason Hawkins on August 15, 2013
  • Tracking 3rd Party Shopping Carts

Blog Post Overview about Tracking 3rd Party Shopping Carts

If you are having trouble tracking the eCommerce transactions of your PPC or SEO campaign due to the fact that your shopping cart is hosted on a separate domain then you need to implement cross domain tracking by making some tweaks to your site and tracking code. This blog post is meant to explain how you can successfully implement cross domain tracking with Google Analytics. You certainly are going to need some HTML and basic Java Script experience to complete this setup, you may want to spend some time learning the basics before you read this post.

Tracking Multiple Domains with Google Analytics

How does it work?

Tracking two websites with one Google Analytics tracking code is something that can be done by using 2 similar tracking codes on two websites and making some changes to the source code of any linking points from site A to site B, for example a certain “buy now” button that when clicked on takes you to a 3rd party shopping cart site. Another example is a form that someone must fill out before getting directed to your shopping cart which is on a third party site, typically the submit button is a link from site A to site B. The process of tracking a visitors cookie session information from one site to another can be done by calling the _linkByPost() or _link() method in your GA tracking code.

If you are monitoring the progress of an eCommerce SEO campaign or PPC campaign, tracking your online transactions is extremely important. The problem is that if you are using a shopping cart that is hosted on a third party site, getting the modified analytic tracking code on the shopping site may be a difficult task to accomplish. Typically, eCommerce solutions like Magento, OScommerce or Woo Commerce have features that make it easy to install your tracking code but if you are using a shopping cart platform that is hosted and or built by someone else then you may run into some trouble getting things done. Feel free to contact us by phone or filling out our form if you run into problems that may not be covered in this post.

Implementing Cross Domain Tracking on Ecommerce Websites.

The first step is to get your tracking codes right, the standard GA tracking code looks something like this:

Google Analytics Tracking Code

Modifying your tracking code.

The modifications that you need to make to your tracking involve setting the value of _setDomainName to the corresponding site name that the tracking code is placed on. So for Site A your tracking code should set the value of _setDomainName to ‘siteA.com’ as shown in the example below:

Setting domain name for Google Analytics tracking codes.

On your site B, you will need to place the same code with one modification to the code you placed on Site A, the domain name value needs to be set to ‘siteB.com’ like so:

Site B

Last but not least, you need to make sure that you add an extra snippet of code to your JS tracking code just under the _setDomainName() call. The new snippet of code is to let Google Analytics know that you are linking 2 domains and looks like this:

_gaq.push([‘_setAllowLinker’, true]);

Now that Google knows you are tracking two domains with the same account, you can begin to create a filtered profile to separate the data.

Modifying your links from Site A to Site B

The next step is to add some code to the buttons that link site A to site B. If you are linking to your site B with a button you need to follow some simple instructions that will tell Google Analytics to pass along the cookie information from site A to site B.

Typically a links source code looks something like this:

2013-08-15_1848

If you add some code to your links so that they look like this:

2013-08-15_1850

Then Google Analytics will be able to pass that visitors cookie information from site A to site B. Now every site and every button/link is created differently. That being said, you will have to use some common sense and knowledge to modify your link buttons accordingly. Don’t forget to add the same code to the buttons linking from site B to site A as well.

If traffic can move from Site B to site A with a link like this:

2013-08-15_1850_001

Then make sure to change it to something like this:

2013-08-15_1851

Again, every scenario is different, so if you need detailed answer or help please feel free to call us and we would be glad to help!

Creating filtered profiles

Now that you have the tracking codes in place, you need to create separate profiles that strip out the data you want to see. In one profile you will be able to see the data pertaining to the visitors that made it to your shopping site and how they perform, on the other you will see the data you normally see which is the information about the visitors that are on your website.

Assuming you know how to create a new profile with Google Analytics, simply go to your admin and setup a new filtered profile using a custom filter and set the options to the following:

filter

Your filtered profile if setup correctly will now have the data that pertains to the visitors that have successfully navigated to your shopping site. Here you can see great information about which keywords, referral sources, campaigns, locations and landing pages were responsible for driving more sales. This type of data can be very useful if you are working with an Ecommerce SEO company or if you simply have someone providing you with PPC management for Ecommerce websites. Either way, its important to make sure that you are making the most of your data and hopefully now you can make good use of this data that you just learned how to obtain.

SEO Company that specializes in Ecommerce Marketing.

If you are looking for a company that has the capacity and experience needed to manage your eCommerce marketing campaigns then you have found the right place. Our team of gurus are passionate about what they do, your project managers are not going to be some entry level monkey with little to know experience. We provide true talent and results because all of our team members are backed with Google Analytics and Adwords certifications along with several years of technical and fundamental SEO experience. Don’t put your hard earned marketing dollars at risk by choosing just any old SEO company, choose the pros.

Contact us today by calling us directly or by contact us via our form.



About The Author

Jason Hawkins
Jason Hawkins / http://www.themiamiseocompany.com

Jason Hawkins is the CEO & Co-Founder of The Miami SEO Company. He has over ten years of experience in search engine optimization, conversion rate optimization and lead generation. His core responsibilities include identifying ways to increase value of services rendered, training staff on advanced SEO topics, and A/B testing internal processes to consistently improve client return on investment.