This is a guest post by Viljem Pitako, Content Manager at Whoop!.
In this post I’ll show you how to track your conversion value. There are two methods: add the tracking code manually or using the Google Tag Manager. This time, I’ll show you how to do it the good-old manual style. If you understand it to do it manually, you have a better understanding how to do it with the Tag Manager or with webshop extensions.
A Quick Conversion 101
There is no question if you should start with conversion tracking or not. Conversions are essential for marketers and even more important for retailers. Think about it: If you go online without any tracking, you should rethink your business model.
In short, here is what you should ask yourself:
- Does my business succeed? (No matter if you have an online shop or providing other web services)
- Where can I improve or put more effort into?
- Where can I save money or maybe need to invest more?
A conversion is the measurement of some action an individual user did on a website or app. Depending on your business model a conversion can be:
- Newsletter Sign Up
- A complete purchase
- A submitted form
- Click on a button or link
- Reaching a particular page
Wikipedia tells you that a conversion “is the act of converting site visitors into paying customers”. But, according to a blog post of wordstream.com, less than half of small businesses have a working conversion tracking. There is much potential lost. How can one measure success without any tracking?
When it comes to Ecommerce, a conversion can be
- Completed purchase
- Each step within the checkout funnel
- Products added to cart
- Product page views
- A Phone Call
- An offline Store visit or store purchase
- Or simply a newsletter signup
When Will a Conversion Be Triggered?
Let’s stay with the web-based conversions for now. If a user finished a pre-defined action, e.g. he completed the checkout process at your web shop, a conversion is triggered. In webshops, you often have a “Thank you” page or a overlay after completing the checkout. At this point, your website should fire a conversion and you need to place your conversion tag right there.
What Is A Conversion Tag?
A tag is a synonym for pixel, tracking, snippet or tracking code. And the one for Google Adwords looks like this:
<!– Google Code for Acme Inc. –>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 10000222;
var google_conversion_language = “en”;
var google_conversion_format = “3”;
var google_conversion_color = “ffffff”;
var google_conversion_label = “_r6eeeeegQob_CxwM&”;
var google_conversion_value = 1.00;
var google_conversion_currency = “USD”;
var google_remarketing_only = false;
/* ]]> */
</script>
<script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<div style=”display:inline;”>
<img height=”1″ width=”1″ style=”border-style:none;” alt=”” src=”//www.googleadservices.com/pagead/conversion/10000222/?value=1.00&currency_code=USD&label=_r6eeeeegQob_CxwM&guid=ON&script=0″/>
</div>
</noscript>
The out-of-the-box Google Conversion Tag is based on Javascript and can be added to almost any website. But be aware that Shop systems like Magento or Shopify are using different programming languages and you need to adjust the code for dynamic attributes (= variables). Later in this post, you’ll find some examples for various shop systems.
Getting Started
The first step is easy: In your AdWords account you’ll find the button “Tools”. Click on it and select “Conversions”. Now you see a variety of options for different kinds of conversions. In this example, we are focussing on websites. Just hit the “select” button and you can enter your basic information.

Enter the Basic Information
At the beginning, you should set a name which best describes your conversion, e.g. “checkout_successful”.
The next step is more exciting: you need to setup the conversion value. If all your products would have the same, you might choose a static conversion value. This is not an adequate solution for retailers with several hundred or thousand products producing different transaction values. But for the initial setup you just click the second option and enter a static conversion value, e.g. “1”. This will be not our final value. But unless AdWords does not give you any other possibilities, we just use this workaround. Keep in mind: we need to change this value later. Do not set it live unless you want to use a static conversion value.
Now you need to choose how your conversions will be counted. “Every” means that one ad leads to three purchases, and you’ll get three conversions. If you choose “One”, three purchases will be counted as one conversion. Choosing the “One” conversion option only makes sense if your goal is to generate more new customers (for the conversion window you will set in the next step). Ecom people should always use the “Every” counting method to collect the real value of the user journey.
In the next section, you can choose how long you would like to track conversions, the so-called “Conversion window”. The default option is 30 days and goes up to 90 days. We recommend 30 days because most people measure their success on a monthly basis. Same at the “View-through” conversion window. Just click on done and proceed to the next steps.
The next two steps are quite simple, so we just rush through them. You need to select the category for your conversion action which is useful if you have many conversions and you need to group them together in your conversion report. As retailer, you choose “Purchase/Sale” for your transaction conversion. After the category selection, you check a mark at “Include in Conversions” to provide conversion data to the “Conversions” column. This enables bid management tools and Google’s Automated Bidding to use this information for bid management.
Last but not least, you have to select the Attribution model. This is a rather new setting. With the Attribution model, you define how you give credit to different interactions (clicks). Many customers often interact with several ads or do several searches. You need to define to which keyword or ad a conversion will be counted: When he clicked on the first ad or maybe after the last click. The “Last click” Attribution model is recommended and also preselected by Google.
Now you can finish the basic setup and click on “Save and continue”. You can more about the Attribution models here.
Adjust your Snippet To Track Real Conversion Values
Once the basic setup is done, you are almost ready to use your Conversion Tag on your website. You’ll get a Javascript code snippet which can easily be inserted into any website. But at the moment, every conversion which will be triggered is still counted as “1”. As I wrote before, this would only make sense if you want to track leads, newsletter sign-ups etc and do not care about the value. Now we need to manipulate the snippet to show real conversion values. Let’s take a look at your conversion tag first
As you can see in the screenshot above, there are some different variables which contain conversion data. The most important one might be “google_conversion_value”.
Here is a list of all relevant variables for the conversion tracking:
“google_conversion_id”
The conversion ID references a Google Adwords Account (or Client Center) and helps Google to decide to which Account the conversion will be reported.
“google_conversion_label”
The conversion label references the conversion action which you have created. Every conversion action you create will get its own conversion label.
“google_conversion_value”
This is the most important variable. The variable tracks and records the actual conversion value, which will be sent to your Google AdWords Account.
“google_conversion_currency”
This field can be used if you offer different currencies in your shop and converts the value in the collected currency to your conversion tracking currency.
var google_conversion_order_id
There is also a new variable called “google_conversion_order_id” which is especially interesting for online retailers. Sometimes due to technical issues it is possible that your conversion tracking code triggers several times resulting in several conversions reported to your Adwords Account. If you give Google Adwords the information which order id has generated the conversion then Adwords will only count the first conversion and remove any duplicates. This will improve the accuracy of your tracking in most cases. Maybe Google will bring here some more features like remove refunded transactions or update the conversion value if some of the articles were refunded.
Hint: If your Conversion Tag is missing one of the following lines, it won’t work to track conversion values. So let’s call them mandatory:
- “google_conversion_id”
- “google_conversion_label”
- “google_conversion_value”
What if Javascript is not available?
Google integrated a fallback method if Javascript is not available. Most browsers support Javascript, but sometimes script will be suppressed or something else goes wrong.
So make sure the <noscript> tag is included and configured correctly.
Make Your Conversion Tag Dynamic
Like mentioned before, the default static value of the the Conversion value is “1”. But we want Google to track the value dynamically depending on the generated conversion value. You need to manipulate the code snippet and replace “var google_conversion_value = 1;” and “google_conversion_currency” with a dynamic variable or code snippet. Attention: depending on the technology or shop system you are using, the code snippet has be adjusted so that the variables are correctly defined with the appropriate values and are sent to Google Adwords.
To make it more descriptive here is some pseudo-code:
<!– Google Code for ACME Conversion Page –>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 955293601;
var google_conversion_language = “en”;
var google_conversion_format = “3”;
var google_conversion_color = “ffffff”;
var google_conversion_label = “_r66CKvQi2gQob_CxwM”;
var google_conversion_value = “1” [custom_order_value_variable_and_snippet];
var google_conversion_currency = “USD”;
[custom_currency_value_variable_and_snippet];
var google_remarketing_only = false;
/* ]]> */
</script>
<script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<div style=”display:inline;”>
<img height=”1″ width=”1″ style=”border-style:none;” alt=”” src=”//www.googleadservices.com/pagead/conversion/955293601/?value=[custom_order_value_variable_and_snippet]&currency_code=[custom_currency_value_variable_and_snippet]&label=_r66CKvQi2gQob_CxwM&guid=ON&script=0″/>
</div>
</noscript>
In the next paragraph are some examples which can help you to implement the code in your shop system.
Magento and other PHP-based systems
<!– Google Code for Purchase Conversion Page –>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 1234567890;
var google_conversion_language = “en_US”;
var google_conversion_format = “1”;
var google_conversion_color = “666666”;
var google_conversion_label = “xxx-XXx1xXXX123X1xX”;
var google_conversion_value = 10;
if (<?php echo $totalValue ?>) {
var google_conversion_value = <? echo $totalValue ?>;;
var google_conversion_currency = <? echo $currency ?>;
}
var google_conversion_currency = “USD”;
/* ]]> */
</script>
<script type=”text/javascript”
src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<img height=1 width=1 border=0
src=”//www.googleadservices.com/pagead/
conversion/1234567890/?value=
<?php echo $totalValue ?>&conversion_currency=<? echo $currency ?>
&label=Purchase&script=0″>
</noscript>
Shopify
In Shopify it looks a bit different and you don’t need to replace the “google_conversion_currency” in your Conversion Tag. You can easily add your snippet in the Shopify settings at “Settings” -> “Checkout” -> “Order Processing” -> “Additional Content & Scripts”.
<!– Google Code for Purchase Conversion Page –>
<script type=”text/javascript”>
/* <![CDATA[ */
var google_conversion_id = 1234567890;
var google_conversion_language = “en_US”;
var google_conversion_format = “1”;
var google_conversion_color = “666666”;
var google_conversion_label = “xxx-XXx1xXXX123X1xX”;
var google_conversion_value = 10;
if ({{ subtotal_price }}) { var google_conversion_value = {{ subtotal_price | money_without_currency }}; }
var google_conversion_currency = “USD”;
/* ]]> */
</script>
<script type=”text/javascript”
src=”//www.googleadservices.com/pagead/conversion.js”>
</script>
<noscript>
<img height=1 width=1 border=0
src=”//www.googleadservices.com/pagead/
conversion/1234567890/?value=
value={{ subtotal_price | money_without_currency }}
&label=Purchase&script=0″>
</noscript>
WooCommerce
In WooCommerce you can manually adjust your “Thank you” page or download a plugin which lets you quickly add your conversion tag. Most of the plugins will just add an additional menu point in your WooCommerce settings, where you insert your conversion tag like it was shown in your AdWords account.
The final result
Congrats! If you followed the steps correctly, you can now check your conversion value in AdWords. To quickly check it you can add the column “Conv. value” to your view.
The most common Mistakes when it comes to tracking your conversions
1: There is no tracking
If you not already tracking your conversions, just start now. That’s it.
2: Syntax errors in your Conversion Tag
Double or triple check the syntax of your Conversion Tag after you edited it. Depending on the syntax of your code (and the shop system you’re using), you are not allowed to use certain characters like “,” or “$”. Remember the “google_conversion_value” variable”? Sometimes people add a currency symbol which will break the entire code:
var google_conversion_value = “$20”;
It should look like this:
var google_conversion_value = 20;
Also take care that you use the correct decimal separator. A “,” is not recognized as decimal separator.
3: You updated your shop system or website
After updating your website or shop system you need to double-check if your conversion tracking is still working. If not, first check if you still find your conversion tag in the HTML code.
4: Wrong placement in the HTML document
In some browsers (like older Internet Explorer versions), you need to place the conversion tracking code inside the <body> tag of your HTML document. Otherwise, they might not load or execute your code snippet.
5: You are using HTTPS but your Conversion Tag doesn’t
Today it’s recommended to use the HTTPS security protocol to secure the transferred website data. If you don’t use it yet, you should put it to your high priority to-do list. Anyway, sometimes online shops have a mismatch between the URLs in your Conversion Tag and your website. The protocols between your website and your Conversion Tag always have to match.
6: Your Redirect is Faster than the Conversion Tag
Sometimes the redirect to a thank-you page (which is rendered on client-side) is faster than your Conversion Tag can submit the conversion value. This often happens if the internet connection is unstable or slow (e.g. on mobile) and can cause a conversion hiccup. Maybe some conversion won’t be sent to AdWords, so just make sure you not redirecting too fast.
Conclusion
Setting up the AdWords Conversion value tracking is no rocket-science. If you just follow the steps above it should be no problem to track your conversion value. In the next post of this series, I’ll show you how to use the Google Tag Manager for measuring your conversions – stay tuned!
Viljem is working as a Content Manager at Whoop!. He loves Google Shopping and all PPC related content. He has a strong background in Marketing and Web development, which fits perfectly to his work at Whoop! He’s also super-social, just connect with him on Linkedin!
About Whoop:
Whoop! is the first and only tool which is specially made for Google Shopping. Whoop!’s self-learning algorithm supports you with finding the best bids and offers a huge variety of advanced features to optimize your Google Shopping campaigns. You can use Advanced Bid Strategies or Bid Modifiers to squeeze out the maximum of your PLA campaign. You can find more information at whoopapp.com or start a free trial.