
A guide to using the Facebook Pixel - zappo2938
https://github.com/adam-s/facebook-pixel-guide/blob/master/README.md
======
kuschku
This, btw, is where the EU cookie law applies, and what it was intended to
prevent.

You can not embed that tracking pixel without first having approval from the
user.

(This – third party cookies for tracking – is the entire reason the damn law
was written in the first place, and yet we still haven’t gotten rid of them).

~~~
0x0
Isn't it crazy how the cookie law requires all web sites to be honest and
provide opt-in mechanisms, while still doing nothing to protect against
shadier outfits ignoring it all, when a browser setting could solve the
problem in a 100% failsafe way?

~~~
kuschku
Well, it doesn’t require all websites. Only those who use additional technical
means purely to track the user.

A login cookie doesn’t require approval, nor do settings cookies.

Only once you start loading Google Analytics, Piwik, Facebook, etc the law
starts to apply.

------
warpech
This is what sometimes is called a "third party cookie"

~~~
gcb0
which you should disable as soon as you install your browser.

unless you bought into the Google one. since Google also benefit a lot from
3rd party cookie, it paid Mozilla so they enabled it by default (use to be off
by default) and i think recently chrome ever removed the option to disable it.

disabling 3rd party cookie is a million times more effective than enabling the
joke of the do no track settings in the browser.

~~~
scrollaway
> _it paid Mozilla so they enabled it by default_

Sources please.

~~~
mamadrood
It's not true, Mozilla actually tried to block them by default back in 2013
but was threatened by the ad industry and backed down.
[http://www.computerworld.com/article/2495739/internet/ad-
ind...](http://www.computerworld.com/article/2495739/internet/ad-industry-
threatens-firefox-users-with-more-ads-if-mozilla-moves-on-tracking-plans.html)

I think it was mistaken for Google paying Mozilla to keep it as default search
engine.

~~~
Flimm
And yet desktop Safari continues to block most third-party cookies, last I
checked.

~~~
gcb0
most?

------
kripy
Nice write up! As what you have is a catalogue of sorts you should have a look
into Dynamic Product ads: [https://www.facebook.com/business/a/online-
sales/dynamic-pro...](https://www.facebook.com/business/a/online-
sales/dynamic-product-ads). This is Facebook's programmatic play which does
all the segmentation work in the background.

------
palmdeezy
This is a great overview. I find it interesting that there is still
significant friction with setting up arguably one of FB's most useful ad
tools....I also find it interesting that tracking pixels pretty much haven't
changed since the late 90s.

~~~
kripy
Out of the box, all you need to do is drop the default code onto your web page
and it will call the 'PageView' event. Pretty much the same deal as Google
Analytics (and Twitter also have their own version). @palmdeezy has taken it a
little further to include extra metadata in order to segment website visitors.

And I agree that these snippets have been around for a while but how else
could you facilitate passing data back to ad exchanges? JavaScript seems to be
the perfect tool to get the scale required to handle these types of
interactions.

------
throwaway98237
As a consumer I can totally read that and understand what I've given up.
Totally.

------
soared
This is unnecessarily complicated. You can create a custom audience with url
definitions and don't need custom events for that. Unless you are using a
single page site there's no need to over complicate this with more JavaScript.

~~~
jackgolding
This example is a single page site.

------
shostack
I have found the FB pixel to be both awesome and not fully baked in terms of
reporting.

The general concept of allowing custom events is awesome. It means it plays
really nicely with situations that don't fit nicely into their standard
events. By the same token, custom events feel like second class citizens in FB
ad reporting.

Here is a scenario and I'd love any suggestions if people have them because
there is no documentation on this and FB has basically done away with access
to a live person for ads (while interestingly enough Google now goes out of
its way to connect you with a live person, even if only via chat).

I work on a product with a free trial with subscriptions of multiple plan
levels and terms. I can track a custom event on subscription and pass plan and
term params along with the revenue data, but there is no easy way to drill
into those dimensions keyed off of custom params with their reporting. The
only manual hack I've found is to create an aggregate custom event for all
subscriptions for top level reporting, and then individual custom events for
each plan/term permutation (plan1/annual, plan1/monthly, plan2/annual,
plan2/monthly, etc.).

This is manageable for now as there are only 8 events plus the aggregate one,
but I then have to add each of those as custom columns to reports which gets
super messy.

The not fully baked part is that as an advertiser, my ideal reporting
dashboard in FB would let me drill in at multiple levels and segment reporting
by these custom dimensions just by using a single custom event's params. So
I'd have a report segment option for plan and term that then broke those out
in the table and then the chart (and their charting capabilities are also
sorely lacking right now for serious advertisers).

Instead, I need to dump this to a spreadsheet and pivot it if I want to do any
serious analysis.

Has the author or anyone else solved for this differently outside of using a
PMD with better reporting? We'll end up switching to one soon enough, but I
feel like FB has really failed to go the final steps with this. Adding custom
parameters but then not allowing advertisers to report and segment by them is
a huge opportunity for them. And they clearly have the data parsed already
because offer it in the custom conversion and audience builder tools.

Also, and this applies to most ad platforms...I wish there were better support
for recurring up and LTV tracking and reporting. Helping me easily report on
the full deferred value the ads are driving makes it easier for me to build
the case for more spend. I can do that in other analytics tools, but I feel
like this is data FB would want to have in a structured format. Maybe that's
just me though.

~~~
mateus1
I totally agree with your sentiment. What you are talking about I have
"solved" by baking the dimensions into Google Analytics. However this is not
really accurate. (I am trying to build a solution to this very problem in my
spare time, actually).

About LTV: Yes, I totally agree. Another thing I don't like is the Facebook
docs: I had a hard time implementing their custom events (trackCustom) because
sometimes their resources link to older API versions and they are in
dissonance of each other.

~~~
shostack
FYI as a word of caution with FB numbers in GA...FB gives 100% credit to view-
through conversions with a 1-day lookback window by default in addition to
click conversions on a 28 day window. GA only has last click attribution by
default in most reports (attribution/multi-channel aside) and only tracks
post-impression performance from channels Google owns (GDN, data piped in via
DCM, etc.). So you'll likely have large discrepancies.

That is actually one of the biggest headaches with getting reporting automated
at scale that I've had to solve for many times in my career. Bid management
platforms don't hold all the data, your ad server can hold most of it but you
need to pipe stuff in and still have real limitations on the levels of data
you have in there, etc. Even extremely expensive enterprise solutions don't
fully solve for all of this.

------
yeldarb
I'm interested in how this works with your business model.

Do you charge job posters extra to get wider distribution (or more budget) on
the ad you are running for them?

Or is this more of a growth hack to simulate having more organic traffic flow
on your site?

~~~
zappo2938
There is no business model. I'm a yacht chef who decided to learn to code
JavaScript. This site is just something to put in my portfolio.

------
martin_a
I appreciate your post. Good insight on the "how to" and it surely got me
motivated to have a look into this.

------
goldfishcaura
Facebook, Google - people treat their numbers as holy because they have so
many smart people working for them (and because they have very good PR
departments).

But I beg to differ. I think it is about time we have a community
investigating these metrics:
[https://segahm.github.io/adwords_investigators.html](https://segahm.github.io/adwords_investigators.html)

