Bird
Raised Fist0
Digital Marketingknowledge~10 mins

Conversion tracking setup in Digital Marketing - Interactive Code Practice

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a conversion tracking pixel to a webpage.

Digital Marketing
<script>
  function trackConversion() {
    var img = new Image();
    img.src = "https://example.com/track?event=[1]";
    document.body.appendChild(img);
  }
</script>
Drag options to blanks, or click blank then click option'
Apurchase
Bclick
Cscroll
Dview
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'click' or 'view' which are not final conversion events.
Forgetting to include the event parameter in the URL.
2fill in blank
medium

Complete the code to send a conversion event using Google Tag Manager's dataLayer.

Digital Marketing
<script>
  dataLayer.push({
    'event': '[1]',
    'transactionId': '12345'
  });
</script>
Drag options to blanks, or click blank then click option'
Aconversion
Bpageview
Cclick
Dimpression
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pageview' which tracks page loads, not conversions.
Using 'click' which tracks clicks but not conversions.
3fill in blank
hard

Fix the error in the conversion tracking code by completing the missing parameter.

Digital Marketing
<script>
  gtag('event', 'conversion', {
    'send_to': '[1]'
  });
</script>
Drag options to blanks, or click blank then click option'
AFB-123456789
BUA-123456789-1
CG-1234567890
DAW-123456789/abcde12345
Attempts:
3 left
💡 Hint
Common Mistakes
Using Google Analytics IDs instead of Google Ads conversion IDs.
Omitting the conversion label after the slash.
4fill in blank
hard

Fill both blanks to create a conversion tracking URL with parameters for source and medium.

Digital Marketing
https://example.com/thankyou?utm_source=[1]&utm_medium=[2]
Drag options to blanks, or click blank then click option'
Anewsletter
Bemail
Csocial
Dcpc
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up source and medium values.
Using generic terms that don't specify the traffic origin.
5fill in blank
hard

Fill all three blanks to complete the JavaScript object for conversion tracking with event name, value, and currency.

Digital Marketing
var conversionData = {
  event: '[1]',
  value: [2],
  currency: '[3]'
};
Drag options to blanks, or click blank then click option'
Apurchase
B100
CUSD
Dclick
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'click' instead of 'purchase' for the event.
Putting the value in quotes making it a string instead of a number.
Using incorrect currency codes.

Practice

(1/5)
1. What is the main purpose of conversion tracking in digital marketing?
easy
A. To measure if ads lead to desired actions like purchases or sign-ups
B. To increase the number of ads shown on a website
C. To create new ads automatically
D. To block unwanted visitors from a website

Solution

  1. Step 1: Understand conversion tracking purpose

    Conversion tracking helps marketers see if their ads cause users to do specific actions like buying or signing up.
  2. Step 2: Compare options to this purpose

    Only To measure if ads lead to desired actions like purchases or sign-ups matches this goal. Other options describe unrelated tasks.
  3. Final Answer:

    To measure if ads lead to desired actions like purchases or sign-ups -> Option A
  4. Quick Check:

    Conversion tracking = measure ad success [OK]
Hint: Conversion tracking = measuring ad success actions [OK]
Common Mistakes:
  • Thinking it increases ad quantity
  • Confusing with ad creation
  • Believing it blocks visitors
2. Which of the following is a correct step to set up conversion tracking on a website?
easy
A. Disable JavaScript on the website
B. Remove all cookies from the user's browser
C. Change the website's domain name
D. Add a tracking code snippet to the specific page where conversion happens

Solution

  1. Step 1: Identify setup requirement

    Conversion tracking requires placing a small code snippet on pages where conversions occur to record actions.
  2. Step 2: Match correct setup step

    Only Add a tracking code snippet to the specific page where conversion happens describes adding tracking code to the conversion page. Other options are unrelated or harmful.
  3. Final Answer:

    Add a tracking code snippet to the specific page where conversion happens -> Option D
  4. Quick Check:

    Setup = add tracking code on conversion page [OK]
Hint: Add tracking code on conversion page only [OK]
Common Mistakes:
  • Thinking cookies must be deleted
  • Changing domain unrelated to tracking
  • Disabling JavaScript breaks tracking
3. You set up conversion tracking by placing a code snippet on your thank-you page. After running ads, you see zero conversions reported. What is the most likely reason?
medium
A. The website has too many visitors
B. The tracking code was placed on the wrong page, not the thank-you page
C. The ads are not running at all
D. The tracking code automatically disables after one day

Solution

  1. Step 1: Analyze zero conversions despite ads running

    If ads run but no conversions show, the tracking code might not be on the correct page that users reach after conversion.
  2. Step 2: Evaluate options for likely cause

    The tracking code was placed on the wrong page, not the thank-you page explains the common mistake of placing code on wrong page. Other options are less likely or incorrect.
  3. Final Answer:

    The tracking code was placed on the wrong page, not the thank-you page -> Option B
  4. Quick Check:

    Zero conversions = wrong tracking page [OK]
Hint: Check tracking code is on actual conversion page [OK]
Common Mistakes:
  • Assuming ads not running without checking
  • Blaming visitor count
  • Believing tracking code disables automatically
4. A marketer added conversion tracking code but sees inconsistent data. Which of these is a likely error in the setup?
medium
A. Running ads only on weekends
B. Using a different browser to check reports
C. Placing the tracking code multiple times on the same page
D. Changing the website logo after setup

Solution

  1. Step 1: Identify cause of inconsistent tracking data

    Multiple tracking codes on one page can cause duplicate or missing conversion counts, leading to inconsistent data.
  2. Step 2: Compare options for setup errors

    Placing the tracking code multiple times on the same page directly affects tracking accuracy. Other options do not impact tracking data consistency.
  3. Final Answer:

    Placing the tracking code multiple times on the same page -> Option C
  4. Quick Check:

    Duplicate codes cause inconsistent data [OK]
Hint: Avoid duplicate tracking codes on one page [OK]
Common Mistakes:
  • Thinking browser choice affects data
  • Believing ad schedule affects tracking code
  • Assuming logo changes impact tracking
5. You want to track multiple conversion actions like purchases and newsletter sign-ups on your website. What is the best way to set up conversion tracking?
hard
A. Add separate tracking codes or events for each conversion action on their respective pages
B. Use one tracking code on the homepage only
C. Track only purchases and ignore other actions
D. Place tracking code only on the website's contact page

Solution

  1. Step 1: Understand tracking multiple conversions

    Each conversion action should have its own tracking code or event placed on the page where that action completes to measure them separately.
  2. Step 2: Evaluate options for best setup

    Add separate tracking codes or events for each conversion action on their respective pages correctly describes adding separate tracking for each action. Other options miss tracking some actions or place code incorrectly.
  3. Final Answer:

    Add separate tracking codes or events for each conversion action on their respective pages -> Option A
  4. Quick Check:

    Multiple conversions = separate tracking codes [OK]
Hint: Use separate tracking for each conversion type [OK]
Common Mistakes:
  • Using one code for all conversions
  • Tracking only one action
  • Placing code on unrelated pages