Updated: Oct 1, 2024
How to set up Meta Ads (IG and FB) for subscriber sign-up tracking
Using Meta Ads, Meta Pixels, and Google Tag Manager with beehiiv
Running a campaign through Meta Ads is an excellent way to advertise your beehiiv newsletter on Facebook and Instagram and introduce your content to new subscribers. Tracking the subscribers you’ve gained via this method gives you crucial insight to optimize your campaigns and determine the return on investment (ROI) of your marketing budget.
A Meta Pixel is a snippet of code that collects data on how users interact with your site. To track new sign-ups from your Meta ads, you can utilize event tracking in Google Tag Manager and integrate your Meta Pixel ID into your beehiiv account.
This article provides both video and written instructions for enabling event tracking to send data to Meta and set up a sign-up trigger when users subscribe to your publication as well as custom variables to track subscribers.
It also covers obtaining a Meta tracking pixel and setting it up within both Google Tag Manager and your beehiiv publication. You can watch the quick video tutorial and/or follow the step-by-step instructions below.
Watch and learn: Meta Ads Tracking (Instagram + Facebook)
- Go to tagmanager.google.com and sign in. Make sure you are using a Google account.
- Click Create Account.
- Fill out all on-screen details:
- Under Account Name add the name of your beehiiv publication.
- Under Country select the country you are based in.
- In Container Setup, under Container name, add your beehiiv publication URL.
- Under Target Platform select Web.
- Click Create. The Google Tag Manager Terms of Service Agreement will appear. Check the box to agree to the terms, then click Yes in the right corner.
- You’ll be redirected to your Google Tag Manager workspace. You’ll see a code that starts with ‘GTM’ in the top right corner of your screen next to Workspace Changes. Copy this code.
- Log in to beehiiv. From the left panel Dashboard, go to Design > Website Builder.
- The Website Builder will open on the Styles tab in the left hand panel. Click on Settings > Pixels.
- Paste the code you copied from Google Tag Manager into the box under Google Tag Manager Pixel ID.
- Go to tagmanager.google.com and sign in to your Tag Manager workspace.
- From the left hand panel in your Google Tag Manager workspace, click Triggers > New.
- In the input box next to the folder icon, enter your trigger name (we recommend using ‘Subscriber Sign-Up’), then click Trigger Configuration, and scroll down to Other. Under Other, click Custom Event.
- Name your Custom Event signedUp entered exactly as shown, as the input is case sensitive.
- From the left hand panel in your Google Tag Manager workspace, click Variables then, next to User Defined Variables, click New.
- In the input box next to the folder icon, rename the variable DLV-EMAIL then select Data Layer Variable as your variable type.
- Under Data Layer Variable Name type eventProps.email entered exactly as shown, as the input is case sensitive. Click Save.
- Go to business.facebook.com and log into the Facebook or Instagram account associated with your Meta Business Account.
- In the left hand sidebar, click Events Manager.
If you do not see it, you are likely in the Meta Business Suite, in which case you should click All Tools then scroll down to Advertise. Under Advertise click Events Manager.
- In the left hand sidebar, click + Connect Data Sources. Select Web then click Connect.
- You will be prompted to name a dataset. Enter your beehiiv publication name. Click Create.
- On the next page, enter your beehiiv URL. Click Next.
- You will be asked to choose a setup method. Select Do it yourself. Click Next.
- Under Choose how to connect your website, select Meta Pixel Only. Click Next.
- Under Connect website activity using Pixel click Install code manually.
- From here, disregard the remaining options, and click Continue on each page until you have completed the setup.
- You will be taken to your pixel overview, and see a list of all pixels you have connected. From here, you can copy the pixel ID number under the name of your publication to add to your beehiiv publication or Google Tag Manager.
- From the left panel Dashboard, go to Design > Website Builder.
- The Website Builder will open on the Styles tab in the left hand panel. Click on Settings tab > Pixels.
- Paste your Meta Pixel under Meta Pixel ID. The instructions to get your Meta Pixel ID are included in the setup instructions above. Click Save
Tech Note: If you have the Cookie Consent banner enabled in your account, the pixel will not load unless users click Accept on the cookie banner. If users reject or close the banner, the pixel won't load, and tracking will not work. - From the left hand panel in your Google Tag Manager workspace, click Variables then, next to User Defined Variables, click New.
- In the input box next to the folder icon, rename the variable ID-META then select Constant as your variable type.
- Under Value, paste your Meta Pixel ID. Click Save.
- From the left hand panel in your Google Tag Manager workspace, click Tags > New.
- Click Tag Configuration > Discover more tag types in the Community Template Gallery.
- Search for Facebook then click Facebook Pixel.
- Click Add to workspace.
- You’ll be asked to confirm that you want to add a community template and will be shown the permissions that a Facebook Pixel requires. Click Add.
- Next to the folder icon, rename the tag Meta Event-Subscribe.
- Under Facebook Pixel ID, you can add the Meta Pixel ID you have already created by typing {{ to start a set of curly brackets. A dropdown will appear where you can select the {{ID-META}} that you created in the last set of instructions.
- Under Event Name, change the dropdown from Page View to Subscribe.
- Check the Enable Event Matching box.
- Under Customer Information Data Parameters, click Add parameter. Under Parameter name select Email and under Parameter value type {{dlv-email}} into the field.
- Click Triggering and select the Subscriber Sign-up custom event you created following the instructions above. Click Save.
- Click Submit in the top right corner of your workspace.
- Go to adsmanager.facebook.com and create a new ad.
- Select Leads as your campaign goal and click Manual Leads Campaign.
- Under Conversion Location select Website and under Performance Goals select Maximize number of conversions.
- Under pixel, select the pixel you created.
- From the Conversion Events Dropdown Menu, select Subscribe.
Note: If you are doing this immediately after the rest of your set up, you may get a warning that no data has been received. This is normal and to be expected as it can take up to 24 hours for data to begin populating in Meta’s platform. - Continue setting up your ad as normal.
Step 1: Set up GTM and add it to your beehiiv account
How to set up Google Tag Manager for event tracking
Google Tag Manager allows you to tag events and subscribers to give helpful data points that you can translate into analytics. For instructions on adding
Step 2: Create a custom signup trigger
How to set up a custom sign-up trigger
Setting up a custom sign up trigger in Google Tag Manager creates an event that indicates when someone has signed up for your newsletter. To follow these instructions, you must already have Google Tag Manager set up.
Step 3: Add a custom subscriber variable
How to set up a custom subscriber variable
A custom variable in Google Tag Manager helps platforms like Meta increase conversion data accuracy by matching a subscriber’s email address to their account. To follow these instructions, you must already have Google Tag Manager set up.
Step 4: Create a Meta Pixel
How to set up a Meta Pixel
Step 5: Add your Meta Pixel to beehiiv
How to add your Meta Pixel to beehiiv
Step 6: Add your Meta Pixel to GTM
How to add your Meta Pixel to Google Tag Manager
To connect your Meta Pixel to Google Tag Manager, you will create a custom variable for your Meta Pixel data. In order to follow these instructions, you must first set up a Facebook or Meta Pixel as well as Google Tag Manager.
Step 7: Create a tag in GTM
How to create a tag in Google Tag Manager
This will bring together all of the previous steps to create a tag in Google Tag Manager and deploy the code that communicates the sign up with Google Tag Manager.
Step 8: Connect a Meta Ad to your Meta Pixel
How to connect a Meta Ad to your Meta Pixel
Article Contents
- Using Meta Ads, Meta Pixels, and Google Tag Manager with beehiiv
- Watch and learn: Meta Ads Tracking (Instagram + Facebook)
- How to set up Google Tag Manager for event tracking
- How to set up a custom sign-up trigger
- How to set up a custom subscriber variable
- How to set up a Meta Pixel
- How to add your Meta Pixel to beehiiv
- How to add your Meta Pixel to Google Tag Manager
- How to create a tag in Google Tag Manager
- How to connect a Meta Ad to your Meta Pixel