Facebook pixel Purchase event deduplication - facebook

How can one avoid a duplicate Purchase event when doing conversion tracking with a Facebook pixel? I'm wondering if I can send a unique ID with the event somehow to avoid tracking that event more than once (if, for instance, the user reloads the "thank you"/"confirmation" of purchase page.
I thought about saving a "has_tracked_purchase" field along with the transaction data and only loading the pixel if that is false and setting it to true once the pixel is tracked.
I'm surprised to not find a way to handle deduplication with the Facebook Pixel API.

An init flag might remove the duplicate pixel error all over the place.
If you are using shopify platform then you can use:
{% if first_time_accessed %}
It will fire purchase only one time.

Related

Use facebook tracking pixel for registration success that does not redirect to success page

How do I set a facebook pixel event to track registration completion when my registration form completion redirects to my index page not to a registration success page?
Should I use a standard event or a custom event to achieve this, or, do I have to create an intermediate page that the registration form directs to and then redirects to index page?
Fire the Facebook Pixel event when the user clicks on the form submit with 'click' event listener. Standard versus Custom events is a separate issue, but I suggest sticking with Standard events where you can.
https://developers.facebook.com/docs/facebook-pixel/advanced/
Stephen, you provided too few information.
Richy is right that in your case if you can't control where your user lands after submitting the form you should use onClick event to send a pixel event. You can easily validate the form in the code of the onClick event and send it when you're sure data is according to your expectations. You can even do additional requests to your back-end to check the data.
If you can change how your web-site work you can make a landing page where you'd fire an event if all the processing went right.
If you can also easily do it on your index page by loading it with some parameter in the URL that indicates it is visited after the form was submitted. There you can have a simple JS code snipped with condition in it to fire a pixel event if URL parameter is present or do it with Google Tag manager which is even simpler.
There are a couple of good standard events you can use like Subscribe or Submit Application, review them here: https://developers.facebook.com/docs/facebook-pixel/reference#standard-events
You have countless options depending on what level of changes you can do to the site, you coding skills, CMS you use and precision you need.

Tracking Salesforce Pardot Form Submits / Completions in DTM

I have never had this issue before with normal forms however with trying to track form submits and even form completions from Salesforce Pardot forms Adobe analytics is always counting less form submits/completions then the Pardot platform. It is always very random sometimes 4% lower form submits then Pardot but can be as high as 50-60% at times on forms. The higher the total the bigger the discrepancy between the 2 platforms however Pardot always has more submits (and they are valid because they also contain the information from the user who filled out the form). So Adobe is somehow missing out on form submissions which I assume it may be because Pardot fires really fast at the top of the page and Adobe is slow and probably misses out on a number of form submits.
any help would be greatly appreciated
Setup:
My Adobe DTM / Adobe Analytics tool fires at page bottom and I am using a direct call rule to fire _satellite.track('form submit'); on the form button as form submission and also using an event based rule that looks for a datalayer object called with the string value "thank you page" that triggers a form complete.
Is there a reason you aren't using "Event Type --> submit" here?
Another suggestion that would probably help with the parody between Pardot and Adobe Analytics would be to fire the event on the "thank you" page (or completion) of the form instead of the click of submit.
There are many reasons you might see different numbers between 2 different systems on submit (Form errors on submit,etc.) so it's better to set the analytics event when you know the action is considered complete by Pardot.
Hope this helps.

Facebook Pixel Stats GET / Reading

I have a Facebook Pixel on my website that is tracking events. I saw on the Ads Manager dashboard, that the pixel logs my events in a categorized way, i.e.:
PageView, ViewContent, InitiateCheckout, etc.
Although when logging stats, I include some extra parameters like the product_id maybe or other things, that way when the PageView is being logged, at least I will know which product_id it refers to.
The problem is that the Facebook Ads Dashboard doesn't show any of the extra parameters, it only displays the Count field.
After doing some research, I found this link on Facebook Pixel Stats, where they claim:
Use the Facebook Pixel Stats edge to get pixel statistics.
I tried using the Graph API Explorer, and even the iOS FB SDK for it (API Here) they both return an empty data array:
{
"data": [
]
}
I tried multiple parameter combinations, fields, and everything else to no avail.
If anyone knows whether I'm looking at the wrong place, or what not, all I'm interested in is reading those "extra" parameters that I'm appending to every FB Pixel event I log. Thank you!
You need specifing the parameters for it.
Example:
{fb_pixel_id}/stats?aggregation=url
The answer is displayed for a specific period of time in the past - I would say 24 hours.
You can use paging at the bottom of the json response for going back in time: use the link provided in the content of the field 'previous', and you can step back day by day.

Facebook conversion tracking pixel seems to be fired double

i'm using the Facebook Pixel tracking in one of my (shopping) sites i'm supervising.
For this, i put the standard code into the head section or better said into the head.phtml for a more generic way of handling.
The PageView pixel is fine all the time. But on my checkout success page there is some strange behaviour, because Facebook Pixelhelper tells me first, that the Pageview is loaded successfully. After that, it tells me that the Purchase Pixel is also loaded successfully. And as last, it tells me that the Purchase Pixel did not load. In the FB Pixelhelper the 1st and 2nd pixels are shown fast (Pageview and Purchase), then it takes ~1-2 seconds until the 3rd pixel appears in the list.
The 1st purchase pixel in the FB Pixelhelper shows the URL called for the purchase and all is fine. The 2nd purchase pixel just shows the fbq - track like shown later.
I've included the track in a script tag on the onepage checkout success page with the code:
fbq('track', 'Purchase', {value: '<?php echo number_format($total, 2, '.', ','); ?>', currency: 'EUR'});
There is no other occurency of any Purchase track in the HTML code.
As i do not have access to the FB Backend for tracking, i can't do any checks against code changes.
Even more interesting: On the development system all is fine. The only difference is no https on the checkout. The fbevents.js is included like intended to be with //connect.facebook.net/en_US/fbevents.js so i think, this shouldn't be the problem at all.
Any ideas how i can track this double firing or fix it? Or is there a known issue?

Trigger HTML POST/Form submit w/o JavaScript

I have a timed page that I need to use to submit a form upon the end of a specified time period.
The usage would be: User visits page, 90 seconds later all form data is submitted and user is redirected to next page.
The user is well aware that the page they are on is timed (its for a web-only experiment), so I'm not worried about "unfriendly" browser behavior on this page.
Ideally, I'd like to avoid using JavaScript (some of our targeted users are using no-script for various reasons, but if its the only way, so be it), and would also like to avoid just passing variables through the URL (to cut down on the possibility of spoofing). It is easy enough to set a META refresh tag to do the redirecting, but at the end of the time period I need some way for the response header to be set as if the submit button was clicked, whether or not it actually was.
Thanks in advance for any thoughts you might have.
Can't be done.