Meta(Facebook) Pixel & Conversion API For E-commerce Tracking With Deduplication

Client Background:

Client needs to set up Meta (Facebook) Pixel & Conversion API for E-commerce Tracking on his Website.

Challenges:

This Shopify Store didn’t have a Data Layer enabled and he didn’t want to install Any channel app like Elever to enable it. It was essential to have this information available in the Data Layer to track important metrics like product values, transaction ID, Currency, and user data, such as First name, Last Name, Email, Phone, etc.Without it, accurately measuring key metrics and optimizing the ad campaigns with enhanced tracking would be difficult

Solution:

Implemented E-commerce Events:

  1. Page View
  2. ViewContent
  3. AddToCart
  4. InitiateCheckout
  5. Purchase Meta

(Facebook) recommends sending specific parameters with each event to improve tracking accuracy and provide detailed insights.

To send parameters, I use the Data Layer and create variables to send data dynamically for every event. Also, I use Advance Matching Parameters for Event Match Quality.

I use Google Tag Manager to manage the Conversion Tags /Scripts from a single interface.

I  create a lot of variables to get accurate data from the Data layer. Also Created some Tags and triggers in Google Tag Manager.

Variables Created From Data Layer
 
 
Required Triggers Created to fire the Tags
Created and Configured the tags for Meta (Facebook) Pixel and Server events.
Tags contain required and Advanced Matching Parameters.
 
 
Tags contain required and Advanced Matching Parameters.
For Server Events, I send the required Parameters & Advanced Matching Paremeters.
For Server Events, I send the required Parameters & Advanced Matching Paremeters
Configured Cloud Server and GTM Server Container, and Created the Conversion API tag in GTM Server Container.

Testing the Pixel tag and Server Event tags in GTM Preview mode

Implemented E-commerce Events are Showing in Event Manager With Deduplication, Which means the setup is working Perfectly.
Events Received form Browser & Server and Deduplicated
 
Server event received with expected parameters in Event Manager.

After thoroughly testing in  GTM to ensure data accuracy, I published the container and made it live.

Optimize Your Ads with Advance Matching Parameters — Get Expert Help!