Google Analytics is a free platform build by Google that lets you measure your advertising return on investment (ROI) as well as track your Flash, video, and social networking sites and applications. It’s the most widely used web analytics service on the internet, and for good reason. However, before you can reap the rewards of such a powerful platform, there is one major step you have to take: Placing a Google Analytics Pixel on your site.
To help you launch your tracking, we’ll cover some fundamentals around pixels and scripts around Shopify and WordPress.
- Script: A scripting or script language is a programming language that supports scripts: programs written for a special run-time environment that automates the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled).
- Plugins: Some plugins help in pixel placement. For WordPress, the header footer scripts plugin comes in very handy because it allows you to place pixels/scripts on individual pages, like thank you pages.
- Events: Events are specific codes placed to track specific page activities. For example, you could track add to carts, leads, checkout started, checkout completed and more.
Placing Your Google Analytics Pixel:
For the Google Analytics Pixel tutorial, we will use be using a test pixel. To find to your pixel, log in to your Google Analytics account, set up the account using Google’s setup wizard, and generate the code. You should get the code on one of your final screens. Here is the process for implementation!
Step 1: Generate your pixel:
Here is where you would generate your pixel:
Your tracking ID can also be used to easily place into Shopify:
Your tracking ID should look something like this: UA-44148842-1
Here is our pixel:
})(window,document,’script’,’https://www.google-analytics.com/analytics.js’,’ga’); ga(‘create’, ‘UA-94046338-1’, ‘auto’); ga(‘send’, ‘pageview’);
Step 2: Place the Pixel:
For WordPress, you will need to place your base pixel in the header of your site, just before </head>. To place it, log in to your site, and locate your header file. To access this, go to Appearance > Editor > header.php. Sometimes it will be labeled as something else, but you will always see header.php. Next, find the closing </head> and place it just above that code. Here is an example of where it would go:
On Shopify, it’s a bit easier. Simply add it to your online store preferences shown below:
Step 3: Test Your Pixel
The easiest way to test it is within GA. Simply check back in a few minutes and see if there has been any traffic on your site. You can also go to builtwith.com and check by typing in your URL, and scrolling down to Advertising. If it worked, you would see GA in there.
After you’ve set up your Google Analytics account, you’ll want to learn how to read your data. Get started with our guide to organic social media in Google Analytics. Check back shortly for a tutorial on how to place pixels for Facebook!
Take your marketing to the next level. Access Hawke Media’s July White Paper: The Power of Search Engine Marketing.