Tracking Click-to-Call Events with Google Tag Manager

Tracking specific click-to-call events on a page with a universal pixel in Google Tag Manager (GTM) involves two steps:

  1. Create a universal pixel in Basis.

  2. Create a tag and trigger for your universal pixel in GTM.

1. Create a Universal Pixel in Basis

Universal pixels can act as conversion pixels and audience pixels on multiple pages at once. This lets you use a single pixel on different pages on your website, and even place that pixel before your conversions or audiences are set up. See Universal Pixels for more information.

Before you create a universal pixel, identify the URL and the click-to-call event you want to track. In this scenario, you track any of these phone numbers.

Example website showing elements with a click-to-call event.

To create a universal pixel in Basis:

  1. Go to Main Menu [] > Pixels & Audiences.

  2. Select a brand. Use search, sort, or filters to find your brand.

    Pixel and Audiences page with a brand name highlighted
    • If you already added a DSP line item to a campaign, you can access pixels and audiences from the media plan by selecting DSP Actions > Pixels & Audiences from the line item.

      DSP Actions menu with Pixels and Audiences highlighted
  3. Select the Universal Pixels tab.

    Universal Pixels tab highlighted.

  4. Click Create universal pixel.

    Create universal pixel button highlighted.

  5. Enter a Pixel Name.

  6. Click Create rule set.

    1. Click Add rule to create a new Key/String rule to capture this click-to-call event.

      New Universal Pixel window showing creating a new rule set and adding a rule.

    2. Set the Type to Key/String and Operator to Exactly Matches.

      Keys and strings are case sensitive variables that you set to any alphanumeric values. They must exactly match what you enter for your universal pixel’s rule set.

    3. Enter the Key and String. The variables for this scenario are homepage and clicktocall.

      We don’t recommend leaving spaces in your key or string. They can render incorrectly as the pixel loads in your browser.

    4. Select the Audience and Conversion.

      Rule configuration settings highlighted to show available options.

    5. Confirm that the Tag Type is set to Script. Using a script pixel lets users take advantage of user matching and cookieless conversion attribution.

      Pixel details showing tag type of Script, and both Enable cookieless conversion and Enable user matching selected.

    6. Copy the Tag Code.
    7. Click Save to create your universal pixel. Your universal pixel is now ready to be placed in GTM.

2. Create a Tag and Trigger for Your Universal Pixel in GTM

After you install your GTM container on all pages of your site, create a tag. See Google for installation details: support.google.com/tagmanager/answer/6103696. A tag is made up of two components: tag configuration and triggering. Tags are segments of code provided by analytics, marketing, and support vendors to help you integrate their products into your websites or mobile apps. With GTM, you no longer need to add these tags directly to your projects. You configure and publish tags from within GTM. See Google for more tag details: support.google.com/tagmanager/answer/3281060.

To create a tag:

  1. Log in to GTM.

  2. From the Workspace tab, select Tags, then click New.

  3. Click inside the Tag Configuration box to open the Choose tag type panel.

  4. In the Custom section, select Custom HTML.

    Google tag managager custom tag configuraiton showing custom  HTML.

  5. Paste your universal pixel’s tag code into the HTML box.

  6. Add the ?Key=String amendment to the tag code, which is bolded in the following examples:

    <img src="https://pixel.sitescout.com/up/60b6d9d123b9e118?Key=String" width="1" height="1" style="position: absolute; left: -150px;" />

  7. Insert the key and string variables from the rule set you created for your universal pixel into the amendment. For this scenario, the amended tag code looks like this:

    <img src="https://pixel.sitescout.com/up/60b6d9d123b9e118?homepage=clicktocall" width="1" height="1" style="position: absolute; left: -150px;" />

    HTML code showing the key string variable.

  8. Click Save to create a new tag for your universal pixel.

After you create a tag, create and apply a trigger to your universal pixel. A trigger scans your web page or mobile app for certain types of events like form submissions, button clicks, or page views. The trigger tells the tag to fire when the specified event is detected. Every tag must have at least one trigger to fire. See Google for more trigger details: support.google.com/tagmanager/answer/7679316.

To create and apply a trigger:

  1. From GTM’s Workspace tab, click Preview to identify the triggering variables that cause your button to fire. Tag Assistant opens.

    Tag Assistant helps you verify that you have installed various Google tags correctly on your page. Tag Assistant tells you which tags are present, reports any errors, and suggests improvements that can be made to your implementation on any page. See Google for more tag assistant details: get.google.com/tagassistant/

    Google tag manager workspace highlighting Preview button.

  2. In the Your website’s URL field, enter the URL of the page where the click-to-call event is located.

    Tag manager preview with example URL and connect button highlighted.

  3. Click Connect. A window opens with the specified page.

  4. Clear Include debug signals in the URL. This can cause issues with landing page view pixels firing.

  5. Click Continue.

  6. In the window with the specified page, click each phone number one time.

    Example web page highlighting click-to-call events.

  7. In Tag Assistant’s Summary panel, locate and select a click event. The clicks are numbered and grouped with the page where the clicks occurred. These are the click events because Preview tracks all events that happen on this page.

  8. Select the Variables tab to locate your triggering variables. In this case, look for Click URL and Page URL. We recommend taking a screenshot of your variables to use as a reference when creating a new trigger.

    Trigger variables highlighting Click URL and Page URL.

  9. From GTM’s Workspace tab, select Triggers.

  10. Click New to create a new trigger.

    Google tag manager workspace tab with New button highlighted.

  11. Click inside the Tag Configuration box to open the Choose trigger type panel.

  12. In the Click section, select All Elements.

    Choose trigger type window highlighing All Elements.

  13. Select Some Forms to set what the trigger fires on.

  14. If you need to set more than one condition, click + to add more conditions.

  15. Set your trigger’s conditions with your variables. Refer to your screenshot to set the conditions.

    • Since you’re tracking all three phone numbers, which change with each page refresh, only use the “tel:” portion of the Click URL. If the phone number is fixed, use the entire URL.

    Trigger configuartion showing the Click URL and Page URL settings.

  16. Click Save.

  17. Enter a Trigger Name, then click Save to create a new trigger.

  18. After you create your trigger, apply it to your universal pixel.

    1. From the Workspace tab, select Tags.
    2. Select your new tag.
    3. Click inside the Triggering box.
    4. Click + to apply your new trigger.
    5. Click the Search icon, then enter your trigger’s name.
    6. Select your trigger.

      Window showing the trigger being applied to a universal pixel.

    7. Click Save. Your trigger is now applied to your universal pixel. You’re now tracking a specific click-to-call event with a universal pixel.

How to Check if Your Universal Pixel is Firing in Chrome

After the GTM container has been published, check if your universal pixel is firing on all pages correctly in a live environment.

To check if your universal pixel is firing in Chrome:

  1. In Google Chrome, select Chrome’s Menu icon > More tools > Developer tools (Ctrl+Shift+I) to open the Developer tools panel.

  2. Select the Network tab.

  3. Search for the Key Value, homepage=clicktocall in this case, then click the phone numbers to see if your universal pixel fires in real time.

    Chrome developer tools showing pixel fires in real time.