Conversion Event: Unique AddToCart (or any other event you want to be unique):
When trying to optimize for AddToCart (because you are not getting enough purchases for the pixel to learn) I see AddToCart gets screwed up partially due to multiple AddToCart per user. A real buyer might AddToCart once and buy, while a window shopper will AddToCart 10 items but not buy and ruin what you try to achieve.
After some Sunday tinkering:
1. Add some magic code. (Included below)
2. Set up a custom conversion (Image 1)
3. Select the custom conversion in your adset (Image 2)
// THE CODE
// Add this in ADDITION to you AddToCart event. I use ViewContent to not disturb the normal AddToCart.
if(sessionStorage.getItem(“uniqueAddToCart”) === null){
// The above checks if the uniqueAddToCart has been fired. If not then it runs the code below.
// This registers the event
fbq(‘track’, ‘ViewContent’, {content_type: “Unique_AddToCart”});
// This marks this current session that uniqueAddToCart has been fired so that it will not fire again.
sessionStorage.setItem(“uniqueAddToCart”, “1”);
}
// Please test and verify BEFORE you use it at scale.
// END OF CODE
*****
The above technique can be used for stuff like custom events for people that view at least 2 pages (non-bouncing visitors) etc. Even time spent on page (that requires a bit more javascript programming).
Basically, you can trigger custom events for whatever behaviour that you think is a better indicator of a valuable prospect than just the regular addtocart, initiate checkout etc etc.
The behaviour can be a combination of things. For example “viewed a TOF blog post and then went to a product page”.
Please note that this is NOT same as building a custom audience. This is about sending a signal to FB that the user has in fact done what you wanted them to do.