Four Items You Need to Get Started

Before adding any tags using Deviate Tracking, you need the following four items (we suggest you saving them in a convenient notepad so you can easily copy and paste them as you create tags):

  1. Your Facebook Pixel ID
  2. Your Facebook access token
  3. Your Deviate Tracking license key
  4. Your Deviate Tracking license email

#1 and #2 can be acquired inside your Facebook Events Manager (odds are, this link should help take you there). You should see your pixel number to the top right.

Facebook Pixel ID
Where to get your Facebook Pixel ID

Then you’ll click on the tab, “Settings” and in the new screen, scroll down till the “Conversions API” section. Here, you should see the link, “Generate access token”.

How to generate a Facebook access token
How to generate a Facebook access token

Clicking on that will bring up a new section that shows your access token.

#3 and #4 can be found in the Deviate Tracking confirmation email that was sent to you (search for emails from [email protected]).

Now that you have these 4 pieces of information needed (again, we suggest you have these handy and ready to be copied and pasted since you’ll need them for each Deviate Tracking tags you want to create), you are ready to move on creating your GTM tags.

Note, you may want to save these as “Variables” so that you can easily recall them every time you create a tag using Deviate Tracking. You’ll use the variable type, “Constant.”

Deviate Tracking GTM Variable
Deviate Tracking GTM Variable

Update Conversions API System User Access

Before moving forward, you need to grant “Conversions API System User” the proper access to your pixel. After you took the steps above to generate your access token, you need to visit Facebook Manager and visit Users -> System Users.

You should see a new user called, “Conversions API System User” which is automatically generated when you generated the access token. Clicking on that opens up the “Assigned Assets” screen which should reveal your pixel.

Make sure the “Manage Pixel” is highlighted. Click Save.

Facebook Conversions API system user
Facebook Conversions API system user

Import Deviate Tracking into GTM

Head on over into your Google Tag Manager and enter the appropriate Container then on the left hand side, click on “Templates” followed by “Search Gallery”.

Deviate Tracing in GTM Template Gallery
Search GTM Templates Gallery for Deviate Tracking

In the search bar, find “Deviate Tracking.”

Import Deviate Tracking GTM Tag Template
Import Deviate Tracking GTM Tag Template

And then click on “Add to workspace.”

Add Deviate Tracking to GTM workspace
Add Deviate Tracking to GTM workspace

Create Your Tag

Now comes the easy part…

Create your GTM tags by clicking on “Tags” and then “New.”

Create GTM Tag with Deviate Tracking
Create GTM Tag with Deviate Tracking

In the tag creation window, name the tag as you wish and set the proper triggers (as you normally would). Where Deviate Tracking comes in is in the “Tag Configuration” window.

You’ll find “Facebook Conversions API (CAPI) by Deviate Tracking” as a tag type option, select it.

And in the associated options window, you’ll enter the four items you should have handy:

  1. Your Facebook Pixel ID
  2. Your Facebook access token
  3. Your Deviate Tracking license key
  4. Your Deviate Tracking license email

Then you’ll select the Facebook Standard Event Name you’d like tracked and of course configure the proper Triggering.

Note that the “Send Server Event” and “Send Browser Event” are checked by default because Deviate Tracking will take care both for you. You should leave these checked unless you have specific reasons to do otherwise.

Enter info into Deviate Tracking tag configuration
Enter info into Deviate Tracking tag configuration

Setup Facebook CAPI Pixel

You’ll want Deviate Tracking to handle your Facebook Pixel as well so it can synchronize with Facebook CAPI. This means creating a tag – name it something to the extent of “Facebook Pixel (CAPI)”. Setup your Deviate Tracking tag per the steps above and select “PageView (Facebook Pixel)” as the Facebook Standard Event Name. Odds are, you want your pixel on all of your pages so in our example, we have the trigger set on “All Pages.”

Deviate Tracking CAPI Facebook Pixel
Deviate Tracking CAPI Facebook Pixel

You can now delete your legacy Facebook Pixel code (most likely within GTM, it was contained inside a Custom HTML tag).

And you can test that your Facebook Pixel is installed properly by installing Facebook Pixel Helper (here’s the link for the Chrome extension). Upon loading the page (make sure you are not cached) and opening up the Facebook Pixel Helper, you should see it registering that it shows the pixel firing. (Note that you’ll see a warning about it activating “2 times” – this is to be expected and is a result of how CAPI works.)

Facebook Pixel Helper
Facebook Pixel Helper

Now create any other tags you want and don’t forget to publish your GTM workspace when you are ready!

Testing Your Deviate Tracking Configuration

It would behoove you to test your configuration and make sure your pixel is communicating with our Deviate Tracking server properly. This tutorial will walk you through it.