How to use Google Tag Manager for Client-side Pixel Tracking?

Perform the following steps to create a base pixel:

  1. In the Tags section, click New.
  1. Select Tag Configuration. The Choose Tag Type page appears.
  1. Select Custom HTML as tag type and paste the base pixel code.
  1. Click Trigger Configuration and select Page View, which fires on All Page Views.
  1. Below is how the tag looks. Name it as “Base Pixel” and save it.

Perform the following steps to create an Event tag:

Note: To create an event-specific tag, create a new tag in the same way as above steps 1 and 2, and enter the event code.

  1. Click on Tag Sequencing under Advanced Settings. Select the Fire a Tag Before check box and then select Base Pixel (created in step 4) from the dropdown.
  1. Add a suitable trigger.
  1. For example, if you want to fire this event when a button with the event Purchase is clicked on, create a trigger. Select Click – All Elements, then Some Clicks under fires on. Select Click Id, Contains, and enter the ID of click element ( In this case, Purchase).
  1. Save and publish your changes.