Step-by-Step: Adding Instagram Business Tracking (Meta Pixel) to GTM

Modified on Wed, 5 Nov at 2:09 PM


The tracking code for tracking your campaigns performance on Instagram can be done through your Meta Pixel code.


This code must be installed on your website to track events that happen there. Google Tag Manager is the tool used to manage and deploy this code without editing your site's source code directly.


1. Get the Meta Pixel ID


  1. Go to Meta Business Suite > Events Manager.

  2. If you don't have a data source (Pixel) yet, click Connect Data Sources > Connect. Follow the prompts to name your Pixel.

  3. Once your Pixel is created, you will find your Meta Pixel ID (a long number) in the Events Manager interface. Copy this ID.




2. Add the Meta Pixel Template in GTM


  1. Log in to your Google Tag Manager account and select your website's container.

  2. Navigate to Tags and click New.

  3. Click Tag Configuration.

  4. Click Discover more tag types in the Community Template Gallery.

  5. Search for Meta Pixel or Facebook Pixel and click on the official template (usually provided by "Facebook/Meta").

  6. Click Add to workspace and Add to confirm.




3. Configure the Base Meta Pixel Tag

  1. In the Tag Configuration screen:

    • Tag Name: Name your tag clearly, e.g., "Meta Pixel - Base Code".

    • Pixel ID: Paste the Meta Pixel ID you copied in Step 1.

    • Standard Event: Leave this as PageView (the default base event).

    • Event Name: Keep it as the default, or leave it blank if the PageView option is selected in the Standard Event dropdown.



4. Set the Trigger to Fire on All Pages

  1. Click the Triggering section.

  2. Select the built-in trigger: All Pages. This ensures the Meta Pixel loads on every page of your website.

  3. Click Save.




5. Create Conversion Tags (for specific events)


To track specific conversions like a "Purchase" or "Lead," you need separate tags:

  1. Create a New Tag (Tag Configuration Meta Pixel template).

  2. Tag Name: Name it, e.g., "Meta Pixel - Purchase".

  3. Pixel ID: Paste your Meta Pixel ID again.

  4. Standard Event: Select the relevant event from the dropdown, e.g., Purchase.

  5. Triggering: Click to set a new trigger. This trigger should be configured to fire only on the page where the conversion happens (e.g., the "Thank You" or confirmation page). A common trigger is a Page View trigger with a condition like Page Path equals /thank-you (adjust to your website's path).

  6. Click Save.




6. Test and Publish

  1. Click Preview in GTM to test that your base Pixel and conversion tags are firing correctly on your website using the Tag Assistant.

  2. Once confirmed, click Submit (or Publish) to push your changes live to your website.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article