itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
240 stars 26 forks source link

Conversion tracking for Facebook not injected on download page #643

Open slowriot opened 7 years ago

slowriot commented 7 years ago

Similar to #642 but with the Facebook tracking pixel.

Further to #613 - conversion tracking for Facebook and Twitter, there is now a form in settings to enter a Facebook conversion tracking tag - great!

Unlike the Twitter tracking code at the time of writing, this does actually inject working code on the game pages:

However, it does not inject on the all-important download page:

This is really the most important thing, as it would allow conversion tracking for sales from advertising campaigns on Facebook and Twitter.

slowriot commented 7 years ago

Additionally, neither Twitter nor Facebook pixels are injected on our profile page (https://voxelstorm.itch.io/).

leafo commented 7 years ago

The Purchase pixel is only included on the page immediately after conversion. If you view an exiting page, or refresh it, it will no longer be displayed. Regular download pages do not send an event. Do you need to track downloads separately from purchases?

The twitter pixel works a bit differently than the facebook one from what I saw. You create a new pixel for each event type you wan to track. I've only added a single twitter pixel slot, and that fires after purchase conversion. Do you think you'll be running twitter campaigns for traffic instead of conversions?

slowriot commented 7 years ago

@leafo thanks for the clarification.

The way you've implemented it sounds like it's enough for the basics of what we need. The main problem is that it's not going to be possible to test, or confirm conversion events, without actually getting live purchases to fire the pixel - but that's not a show stopper.

It would be nice to also track page visits and downloads as conversions, since it might be useful to optimise for those in other situations, but primarily we'd be focusing on purchases so this should be enough. Those are also helpful for tracking traffic generally using facebook's increasingly sophisticated analytics platform, since I think they're trying to compete with google analytics for that.

You mention that for twitter you create a new pixel for each event, but actually the recommended way is to have a "universal twitter pixel", and to apply filter rules for individual campaigns to separate what kind of conversion event it was - which can work perfectly well for a single pixel injected everywhere. Here's a screenshot from the pixel setup demonstrating the twitter version: Note the talk about universal website tags being the recommended option, but single-event tags also being available. I've just added our universal tag to our profile settings, and that should work in a very similar way to the facebook single universal pixel.

leafo commented 7 years ago

the universal twitter pixel still just "fires" as far as I could tell. There's no api to send other kinds of events to the same pixel id.

fasterthanlime commented 7 years ago

the universal twitter pixel still just "fires" as far as I could tell. There's no api to send other kinds of events to the same pixel id.

Maybe the idea is that rules operate on the URL the pixel was "fired" on? Since we have consistent URLs, developers could craft rules that's useful for them

slowriot commented 7 years ago

@leafo & @fasterthanlime - yes, the idea is to have it fire for all events, and allow the user to filter their conversions by the URL that's it's fired for. The same idea as Google Analytics conversions (which you can hook into adwords) - you have your single GA tag and define conversion events by the url it fires on or other activities.

Really the absolutely ideal thing would be to allow the user on itch.io to specify both an account-wide tag for twitter (which would be the twitter universal tag) and which shows on all pages, AS WELL as an optional single-event tag for each game/product page to be fired on purchase/checkout only. That would be a little more work but it would give users the most control.

slowriot commented 7 years ago

Incidentally, this is how we have to use the facebook pixel for conversion tracking as well; the conversion system allows you to EITHER target by an event, or by URL. Targeting just by an event type with facebook's system fairly useless, as you're then targeting for any pageview event etc to the pixel without being able to further filter by URL. Here are the options: (no url targeting as well as event type) Only by selecting the URL does it become possible to target conversions for a specific site, game, etc.

I've no idea, however, what URL I should give it for the purchase event to fire on? Would it just be that same page?

leafo commented 7 years ago

that URL contains pattern will work. The exact URL of the purchase includes a randomized key, but it looks like: https://user.itch.io/game/download/randomkey

Why is targetting by pageview event uselesss? Because you have different games with different campaigns? I can add game specific codes similar to how we let you do it with GA. I recommend targeting by event name in case we ever change where we fire purchase/view events. Right now the "download" page is where the purchase event fires, but if we ever add a pageview event to that page then your targeting by URL would break.

slowriot commented 7 years ago

@leafo thanks for that info. Surely the URL pattern I showed will then work, because the example url you gave does contain the pattern?

Targeting pageview is not helpful because that will fire for any page view on one of our pages, regardless of what game the page is. It's not really very helpful to pay Twitter etc to just get views for any of our pages, when our campaign target is to make a sale for a specific game.

I think allowing injection of separate codes for each game would be a help there, definitely. The problem is that we can't target by both event name and url. It's one or the other - which is a pretty annoying limitation of Twitter's platform, but that's just how it works currently. The screenshot I posted above doesn't have any event targeting, it just targets by URL - the event could be a sale, pageview, or anything else, and Twitter doesn't let us filter for that.