Tracking Pixels and Other Custom-Scripted Actions Using Locator Event Tracking Implemented via GTM

When a client locator is set-up for using Destini Locator Event Tracking and implemented via Google Tag Manager (GTM), clients have the ability to further customize their GTM container's tags and triggers so they can have custom scripting fire for Destini events, including tracking pixels provided by Facebook, Doubleclick, and others.

In order to add tracking pixels and other custom scripting as described below, it is required that the Locator Event Tracking for your Destini Locator or Destini Locator Widget was set-up via the GTM method of implementation:


Example: Setting up a Facebook Pixel to Fire for Each Search a User Performs

Use this example as the basis for any tracking pixel or other custom scripting you want to add for firing when any kind of Destini Locator event fires. 


1) Facebook: Create or have ready a Facebook Pixel

Set-up a Facebook Pixel through Facebook's Events Manager.  Copy the code snippet Facebook provides and have it ready to paste.


2) GTM: Create a New Tag

In the existing GTM container you have set-up for your website (and where you previously imported the required tags and triggers for Destini Locator Event Tracking), you will need to create a new tag.  For this example, since we are setting up a pixel to track when a user submits a search request, we suggest titling the new tag DESTINI_SRCHLCTN FB Pixel Tag so that it's familiar when browsing through your tag list.

Set the tag type to "Custom HTML" and paste the FB Pixel code snippet into the HTML box.  Tag Firing options should be Unlimited.  Tag Sequencing should be set to have checked Fire a tag before DESTINI_SRCHLCTN FB Pixel Tag fires; the Setup Tag dropdown should be set to Submit Event. This is done because the DESTINI_SRCHLCTN event is of the "submit" event category - when following these steps for other Destini events, be sure this Setup Tag dropdown matches the event category of the event to which you are connecting a pixel or other custom scripting.




console.log('DESTINI FINDLOCATION FB TAG FIRING: '+' | '+{{DL - category}}+' | '+{{DL - label}});
<!-- Facebook Pixel Code -->
s.parentNode.insertBefore(t,s)}(window, document,'script',
fbq('init', '##########');
fbq('track', 'FindLocation', {category: {{DL - category}}, label: {{DL - label}} });

<noscript><img height="1" width="1" style="display:none"
<!-- /* disabled noscript IMG pending fix of parameters */ -->
<!-- End Facebook Pixel Code -->


Replace ########## with the Pixel ID.  "FindLocation" is one of FB's standard events.  The list of FB events you can use in place of FindLocation can be found here:



3) GTM: Create a New Trigger

You will create a new trigger that listens for DESTINI_SRCHLCTN (or whatever Destini event to which you are adding a pixel or custom scripting).  The new trigger is set to fire the tag you just created (e.g. DESTINI_SRCHLCTN FB Pixel Tag).  We recommend titling the new trigger with the Destini event you are connecting to it, and the event category (e.g. DESTINI_SRCHLCTN Submit Event).

The Trigger Type for this new trigger is Custom Event. The Event Name is submit.  Set "This trigger fires on" to Some Custom Events.  The two conditions to set for this trigger are:

  • Event   contains   submit
  • DL - category   contains   DESTINI_SRCHLCTN

Then, connect the tag you previously created to this trigger.


4) Publish Your Container Changes

Once you publish the changes, your new tag and trigger should work immediately, and you should start seeing activity for the Facebook Pixel in Facebook Events Manager.



Additional References

Was this article helpful?
0 out of 0 found this helpful