in this video I'm gonna show you how you
can track custom events with the help of
Google tag manager and forward them on
to your Facebook pixel all no more
coming up right after this
[Music]
hey then welcome back to another video
of measure school.com teaching you the
data-driven way of digital marketing my
name is Julien and in our last lesson we
have set up our Facebook based tracking
code with the pager tracking code and
now we are ready to actually send in
more sophisticated information such as
interactions that our users take on our
website into Facebook now Google tag
manager is the perfect tool to do this
because we can listen to certain
interactions on our page and then
forward them on to our Facebook pixel
for example or other tools like Google
Analytics and so on but since we are
here our Facebook tracking pixel video
series we want to dive in on how to send
in events with the help of Google tag
manager so let's get started welcome
back to our demo shop now in this video
we're gonna deploy some events to
Facebook with the help of Google tag
manager now in the last video we have
already set up our tags our base pixel
code and then our page.you tag this is
what we need in order to deploy custom
events what our custom events well when
we go over to our Facebook pixel go back
to the setup steps here we went to
manual installation and if you click on
continue we actually go to the event
tracking of Facebook now events are
interactions such as Add to Cart or
purchase buttons so certain interactions
that you want to send explicitly to
Facebook and they have certain events
predefined so for example view content
the search initiate checkout add to cart
or the purchase so you can use one of
these predefined events and see them in
the interface later you could also use a
custom event so if that doesn't fit to
your case that you want to track you
could customize it even further which
you can learn about more in the Help
section of Facebook here
now in our case we just want to go with
the standard event here let's go with
the Add to Cart because that's something
that we can track on our demo shopper
right here and then you can send in any
kind of other event parameters such as
the conversion value in our case that
could be the pricier or the currency I
won't do this for now because it
complicates our tag set up but if you
want to get that data into Facebook you
can certainly do that so let's copy this
code here and just go over to tags this
will be our Facebook event tag by to
Cart buttons we'll choose our custom
HTML tag again and implement our code so
this will track an add to card click as
the trigger we need to define the right
Add to Cart click now this usually takes
longer to do because we need to do some
testing here if you want to find out
more how to track button clicks we go
through an example in our video on
button click tracking which I'm also
going to link up in the description
below for now I'm just gonna go quickly
through the steps here I'm going to
track the link clicks go with some
clicks and in our case we don't have our
variables defined yet which is
unfortunate let me just click this with
all link clicks exit here
save this for now go to variables and
activate my variables that I need for
these link trigger and go back to my
pixel code this is the Facebook base
pixel code here's our Add to Cart and go
back into the trigger now I'm gonna use
some clicks because I don't want to
deploy this on every click that is on
the page but only on the click where the
click text contains in our case it would
be Add to Cart now
if you want to recreate this trigger you
might as well go through the tutorial on
button click tracking which explains it
in much more detail then I have just
done let's exit out of this and go into
our preview in debug mode and if you
reload our page here you get our debug
console and if I click on this Add to
Cart button I'm gonna do this with the
command key pressed because it will open
it up in a new tab and then our page
doesn't reload we will be able to see
what is happening inside of Google tag
manager and we see our Facebook event
tag fired and here we have our fifth
click that was our Facebook event tag
Add to Cart you would also be able to
see that in our Facebook pixel helper
that this fired here's our add to cart
that we fired into Facebook and this
should also then show up in our Facebook
analytics let's go back into our
Facebook analytics on the event
debugging we should here see an add to
cart that was added to our event
debugging list so this data was also
received by Facebook now you might have
seen my little test here in the Facebook
pixel have a subscribe button clicked
which is not quite accurate we didn't
send this in explicitly this is
something that Facebook's
pixel automatically picks up from the
interactions but if you want to have
more control over your event tracking
you can send in events explicitly just
like we did right here now as I
mentioned there are many other events
that you could send into Facebook just a
few here or any kind of custom events
Google tag manager gives you actually
the ability to build custom triggers for
your interactions that happen on your
page such as link clicks scrolling form
submit YouTube views and if an element
is inside the viewport so you have a lot
of flexibility of tracking the
interactions
of your user and sending that on to
Facebook for custom audiences or
conversion tracking we have a ton more
videos on this channel on how to build
these custom triggers so I won't go into
detail right now but I'd encourage you
to check out our playlist on event
tracking with Google tag manager for
this Add to Cart click our tracking
works fine so we can go ahead and submit
a version so our container will actually
be published to all our users and goes
live onto our website so now will be
available to all our users and our users
will be tracked on our website in the
next video we're gonna show you how you
can accomplish conversion tracking or
this purchase tracking with the help of
Google tag manager to send data to
Facebook alright so there you have it
this is how you can send in information
such as interaction tracking like button
click tracking or form submit tracking
or scroll tracking on to your Facebook
pixel now it really depends on your
website on what you send into Facebook
you would certainly don't need all the
information in there but it can be
really helpful once you want to optimize
or build a custom audience based on one
or the other interaction now we are not
done here because we really need to take
care of one important interaction that
the user can take on the website and
this is conversion tracking and this is
what we're gonna discover in the next
video so if you are ready head over to
our next video and if you haven't yet
then why not subscribe to our channel
because we'll bring you new videos just
like this one every week now my name is
Julien see you in the next one