
What Are _fbp and _fbc (And Why They Matter for Attribution Tracking)
If you're using Meta's server-side events, you'll get much better results by including the same browser identifiers that live on the client side. The two most important ones are _fbp and _fbc.
So, what are they?
- _fbp is a browser identifier that gets stored in a first-party cookie. It helps ad platforms like Meta link web events to a specific browser.
- _fbc is a click identifier, also stored in a cookie. This one gets created when someone clicks a link with a fbclid URL parameter.
But the tricky part is these cookies come from the browser. Your server container can't just create them on its own. You have to grab them from the browser and pass them along with your server-side tracking.
Honestly, if you're using Shopify, you probably don't need to mess with Stape and GTM. It's often an overkill for small to medium-sized stores. While Google Tag Manager (GTM) is a fantastic tool, it can introduce unnecessary complexity, technical headaches at checkout, and even slow down your site.
That said, if you're determined to make it work, this article will walk you through exactly how to pass the _fbp and _fbc cookies through server-side tagging in Shopify.

Try Aimerce Pixel Risk-Free
for 30 Days
Most teams see results within 2 weeks.
Money-back guarantee.
It pays for itself, or you don't pay anything.
Why You Should Pass _fbp and _fbc Through Server-Side Tagging in Shopify
Browser-side tracking is getting tougher. Browsers block scripts, users delete cookies, and privacy controls are shortening session lengths.
Setting up server-side tracking for Shopify moves event firing to a server container, helping you bypass browser restrictions. The only problem is that you lose direct access to browser cookies like _fbp and _fbc.
By passing these identifiers through a server-side GTM container, you get the best of both worlds: the durability of server-side tagging with the detailed accuracy of client-side identifiers. This leads to better event matching, tighter attribution tracking, and more accurate conversion credits.
For fast-growing DTC brands and luxury toy companies, this isn't just a nice-to-have; it's essential. It bridges the gap between what's happening in the user's browser and what your offline conversions API is seeing on the server.
What You Need Before You Start
You need a few things in place before you can forward _fbp and _fbc to server-side GTM.
First, you need a working server-side Google Tag Manager container. This is your sGTM instance, hosted on a custom subdomain or through a provider.
Second, you need a client-side data layer on Shopify that fires ecommerce events. This is where you'll capture _fbp and _fbc from the browser.
Third, you need access to Shopify theme files or a way to inject JavaScript. You'll use this to read the cookies and push them into your data layer.
If you're using Aimerce for server-side tracking on Shopify, most of this plumbing is handled automatically. Aimerce captures browser identifiers, forwards them to sGTM, and includes them in Meta conversion API Shopify payloads without manual coding.
1. Capture _fbp and _fbc on the Client Side
You start in the browser. You need to read the _fbp and _fbc cookies and push them into your data layer.
Here's a simple JavaScript snippet you can add to your Shopify theme. It reads both cookies and pushes them to the data layer on page load.
This fires before your GTM tags. When your client-side GTM container sends events to sGTM, these values are already in the payload.
If you're running bot filtering or auditing tracking pixels, make sure this script fires reliably. Bots often don't set cookies. Real users do. Capturing _fbp and _fbc helps separate signal from noise.
2. Forward _fbp and _fbc to Server-Side GTM
Once _fbp and _fbc are in your client-side data layer, you need to forward them to your sGTM container.
In your client-side GTM, create or edit the tag that sends events to server-side GTM. Add two new parameters: fbp and fbc. Map them to the data layer variables you created in step one.
When this tag fires, it sends the browser identifiers along with the event payload. Your sGTM container receives them as part of the incoming request.
This step is where Shopify server-side tagging gets powerful. You're bridging the gap between client and server. You're preserving identity across environments.
3. Include _fbp and _fbc in Your Meta Conversion API Payload
Now you're in server-side GTM. You've received fbp and fbc from the client. The final step is to include them in the event you send to Meta.
In your sGTM Meta tag, map fbp to the fbp field in the user_data object. Map fbc to the fbc field. These fields are standard in Meta's server-side events API.
When Meta receives the event, it sees the browser identifiers alongside server-side data like IP address and user agent. Matching improves. Attribution tightens. Conversions are credited to the right campaigns.
For ecommerce conversion tracking, this is the difference between guessing and knowing. It's the difference between wasted spend and profitable scale.
Common Mistakes to Avoid
1. Cookies Not Set
Sometimes _fbp or _fbc aren't set when you expect them. This happens if the Meta pixel hasn't fired yet or if the user arrived without a fbclid parameter.
Your script should handle missing cookies gracefully. Don't send null or undefined values to sGTM. Send the parameter only if the cookie exists.
If you're using Klaviyo server-side tracking setup or another ESP, make sure your client-side pixel fires early. The earlier it fires, the sooner _fbp gets created.
2. Data Layer Timing Issues
Your data layer needs to fire before your GTM tags. If your script runs too late, the values won't be available when the tag fires.
Place your cookie-reading script high in the page head. Fire it on DOM ready or earlier. Test it with GTM preview mode to confirm the values are present before tags execute.
3. Not Testing End-to-End
You need to verify that _fbp and _fbc are making it all the way to Meta. Use Meta's Event Manager to inspect server events. Check the event details. Confirm that fbp and fbc fields are populated.
If they're missing, trace backward. Check your client-side data layer. Check your sGTM incoming request. Check your Meta tag configuration. One broken link breaks the chain.
Client-Side vs. Server-Side Tracking for _fbp and _fbc Comparison Table:
| Aspect | Client-Side Only | Server-Side with _fbp/_fbc Forwarding |
|---|---|---|
| Browser Identifier Capture | Automatic via Meta Pixel | Manual capture required, then forwarded |
| Resilience to Ad Blockers | Low (blocked frequently) | High (server sends events) |
| Attribution Accuracy | Moderate (limited by blocking) | High (combines client IDs with server reliability) |
| Setup Complexity | Low (pixel drop) | Moderate (requires data layer and sGTM configuration) |
| Event Matching Quality | Depends on browser environment | Improved by combining client and server signals |
| Use Case | Small stores, limited scale | Top DTC brands, DTC startups, high-volume ecommerce |
For most popular DTC brands and direct to consumer brands, the server-side approach wins. It delivers better tracking and attribution without sacrificing identity.
How To Simplify Your Shopify Server-Side Tracking?
Aimerce handles the heavy lifting for you. It automatically captures essential tracking cookies like _fbp and _fbc and sends them along with your conversion data to Meta, Google, TikTok, and Klaviyo.
No more writing JavaScript, debugging data layers, or manually mapping fields in Google Tag Manager. Aimerce takes care of everything from start to finish.
For DTC startups and brands, this saves weeks of setup time. You get the power of enterprise-grade server-side tracking for your Shopify store without needing a whole team to manage it.
Aimerce also offers bot filtering, tracking pixel audits, and AI-powered attribution. It's designed specifically for e-commerce events, not just generic web analytics, and is fully optimized for Shopify server-side tracking.
If you're searching for an Elevar alternative or are just tired of setting up Klaviyo server-side tracking by hand, Aimerce is the quickest way to get reliable server-side tracking on your Shopify store.
What Changes When You Get This Right
When you pass _fbp and _fbc correctly, attribution tracking improves overnight. Meta sees more conversions. Your ROAS calculations get more accurate. You stop under-reporting.
For fastest growing DTC brands, this unlocks new scale. You can increase ad spend confidently because you trust your numbers. You can optimize campaigns based on real data, not guesswork.
For list of direct to consumer brands running multi-channel campaigns, server-side tracking Shopify with proper identifiers creates a unified view. You see how users move from Meta to Google to email. You credit touchpoints correctly.
This is especially critical for IOS tracking Shopify fix scenarios. When browser-side tracking fails, server-side tracking with _fbp and _fbc preserves the connection. You don't lose visibility. You don't lose conversions.
Frequently Asked Questions
What is the _fbp cookie?
The _fbp cookie is a first-party browser identifier set by the Meta Pixel. It helps Meta associate web events with a specific browser session. The cookie typically lasts 90 days and is essential for attribution tracking when using server-side events.
What is the _fbc cookie?
The _fbc cookie is a click identifier that gets created when a user arrives at your site with a fbclid parameter in the URL. This parameter comes from Meta ads. The _fbc cookie stores this click ID and helps Meta attribute conversions back to specific ad clicks.
Why can't server-side GTM create these cookies automatically?
Server-side GTM runs on a server, not in the browser. It can't access browser cookies directly or create first-party cookies that persist across sessions. These identifiers must be captured on the client side and forwarded to the server container as part of the event payload.
Do I need both _fbp and _fbc for Meta conversion tracking?
You don't strictly need both, but including both improves event matching quality. _fbp helps with browser-level attribution. _fbc helps attribute conversions to specific ad clicks. Together, they give Meta the best chance to match server events with user activity and ad interactions.
What happens if _fbp or _fbc is missing?
Meta will still process the event, but matching quality may decrease. Without _fbp, Meta relies on other identifiers like email, phone, IP address, and user agent. Without _fbc, click-level attribution may be lost. Your event will fire, but you may see lower reported conversions in Ads Manager.
Can I use this setup with other ad platforms besides Meta?
Yes. The same approach works for any platform that uses browser cookies for attribution. TikTok uses _ttp. Google uses _ga. The principle is identical: capture the cookie on the client, forward it through sGTM, and include it in your server-side event payload.
Does Aimerce handle _fbp and _fbc automatically?
Yes. Aimerce captures _fbp and _fbc from the browser, forwards them to your server-side GTM container, and includes them in Meta conversion API payloads automatically. You don't need to write custom JavaScript or manually configure data layer variables.
How do I verify that _fbp and _fbc are being sent to Meta?
Use Meta's Event Manager to inspect your server events. Click into an event and check the user_data section. You should see fbp and fbc fields populated with cookie values. If they're missing, trace back through your client-side data layer and sGTM configuration to find the break.
Final thoughts
For any serious DTC brand, passing _fbp and _fbc through server-side GTM for Shopify isn't just a nice-to-have it's essential. It’s how you connect the dots between what happens in a user's browser and your server, giving you better attribution, more accurate conversion tracking, and a clearer view of the data that ad blockers and privacy settings usually hide
The process involves capturing cookies on the client side, sending them through sGTM, and adding them to your Meta CAPI payloads for Shopify. For top-performing DTC companies, this is standard practice.
If setting this all up manually sounds like a headache, Aimerce can automate the whole thing for you. It handles capturing and forwarding identifiers and integrates smoothly with Klaviyo, Meta, and Google without needing any custom code.
Get your Shopify server-side tracking right, and you’ll see a real difference in your ROAS in just a few days.
30-Day Aimerce Pixel Free Trial