0
0
Digital-marketingHow-ToBeginner ยท 4 min read

How to Set Up Conversion Tracking: Step-by-Step Guide

To set up conversion tracking, add a tracking code or pixel from your advertising or analytics platform to your website or app. Then, define the specific conversion actions like purchases or sign-ups you want to measure in your platform's dashboard.
๐Ÿ“

Syntax

Conversion tracking typically involves adding a small piece of code called a tracking pixel or tag to your website or app. This code sends data back to your analytics or ad platform when a user completes a desired action.

Key parts include:

  • Tracking Code: JavaScript or HTML snippet placed on your site.
  • Conversion Action: The event you want to track, like a purchase or form submission.
  • Conversion ID: Unique identifier linking the data to your account.
html
<!-- Example Google Ads conversion tracking snippet -->
<script>
  gtag('event', 'conversion', {
    'send_to': 'AW-CONVERSION_ID/label',
    'value': 1.0,
    'currency': 'USD'
  });
</script>
๐Ÿ’ป

Example

This example shows how to set up a simple conversion tracking event for a purchase using Google Ads. The code snippet is added to the 'Thank You' page that users see after completing a purchase.

html
<!-- Global site tag (gtag.js) - Google Ads -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-CONVERSION_ID');

  // Conversion event on purchase completion
  gtag('event', 'conversion', {
    'send_to': 'AW-CONVERSION_ID/label',
    'value': 50.00,
    'currency': 'USD'
  });
</script>
Output
No visible output; sends conversion data to Google Ads when page loads.
โš ๏ธ

Common Pitfalls

Common mistakes when setting up conversion tracking include:

  • Not placing the tracking code on the correct page, such as missing it on the confirmation or thank you page.
  • Using incorrect Conversion ID or labels, causing data to not register.
  • Not testing the tracking setup to confirm conversions are recorded.
  • Ignoring privacy regulations by not informing users or obtaining consent for tracking.

Always verify your setup with test conversions and use platform tools to check data flow.

html
<!-- Wrong: Placing conversion code on homepage instead of thank you page -->
<!-- Right: Place conversion code only on the page users see after completing the action -->
๐Ÿ“Š

Quick Reference

Steps to set up conversion tracking:

  • 1. Choose your platform (Google Ads, Facebook Ads, etc.).
  • 2. Create a conversion action in the platform dashboard.
  • 3. Get the tracking code or pixel snippet.
  • 4. Add the code to the relevant page(s) on your website or app.
  • 5. Test the setup by completing a conversion yourself.
  • 6. Monitor conversions in your platform reports.
โœ…

Key Takeaways

Add the tracking code only on pages where conversions happen, like thank you or confirmation pages.
Define clear conversion actions in your ad or analytics platform before adding code.
Test your conversion tracking setup to ensure data is recorded correctly.
Use the exact Conversion ID and labels provided by your platform to avoid errors.
Respect user privacy by informing visitors and complying with regulations.