Home > Paid Traffic Sources > Facebook & Instagram

Firing FB Pixel while directlinking - is this method legit? (17)


12-13-2016 10:34 PM #1 randomdude123 (Member)
Firing FB Pixel while directlinking - is this method legit?

My idea is to use a FB pixel for app installs without a landing page in the usual way.
Flow: FB Ad --> Tracker --> LP* --> AppStore
*only a few lines of code to fire the FB pixel and redirect to the AppStore

Here is how i would do it:

Code:
<!DOCTYPE html>
<html>
    <head>
        <meta name="robots" content="NOINDEX, NOFOLLOW">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no , charset=UTF-8" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title></title>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
            <!-- Facebook Pixel Code -->
        <script>
            !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
            n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
            n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
            t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
            document,'script','https://connect.facebook.net/en_US/fbevents.js');
            fbq('init', 'xxx'); // Insert your pixel ID here.
            fbq('track', 'PageView');
            fbq('trackCustom', "LanderView", {
               category: 'Gaming',
               offer: 'xxx',
               eventname: 'ClickOnFbAd'
            });
        </script>
        <noscript><img height="1" width="1" style="display:none"
            src="https://www.facebook.com/tr?id=xxx&ev=PageView&noscript=1"
        /></noscript>
        <!-- DO NOT MODIFY -->
        <!-- End Facebook Pixel Code -->
    </head>
    <body>
        <script type="text/javascript">
            window.onload = setTimeout(function () {
                            console.log("Redirecting...");
                            window.location.href = "xxx";
                        },500);
        </script>
    </body>
</html>
I am not an expert but i think that will do the job right? Any suggestions for improvements/optimisations?

Is this method compliant with FB?

I'm running white hat app installs on fb and i rather would not use this method than risk my account.


12-16-2016 12:43 PM #2 randomdude123 (Member)

Is it the wrong subforum for this question?


12-16-2016 04:41 PM #3 flashpacker (Member)

I don't think its the wrong Subforum, its about Facebook so it is relevant.

Can anyone advise if this will work? I am interested to use this method also. Oh and Randomdude123 I assume that you want this to allow you to send conversions from the tracker back to Facebook so you can easily see where conversions are coming from?

Thanks,


12-16-2016 05:26 PM #4 mihalis09 (Member)

I believe that's what you're looking for http://stmforum.com/forum/showthread...l=1#post290864

Zeno's reply to a similar question I made a while ago


12-16-2016 06:25 PM #5 flashpacker (Member)

OKay thank you for this. However, I am wondering if it is possible to have more data than just Audience data for remarketing
using this method.

To be more specific I am using Fb ads direct linked to the offer and Voluum as my tracker. I would like to be able to see data such as
gender/age details in Voluum and if possible even better would be to postback the conversion data from Voluum back into
Facebook so I can really have precise conversion details.
Is this possible please?


12-16-2016 06:49 PM #6 mihalis09 (Member)

Your specific question is above my paygrade but what I've known is that you should avoid at most times to be posting conversions back to the traffic source coz essentially you are giving them all info they need to see how profitable you are. I believe Zeno has touched on this too on one of his facebook guides.

Do you care to explain why for facebook specifically you would wanna post back conversions? The only reason I can imagine is that you see ROI per ad/creative specifically while if you check back on your tracker you only see ROI as an average of the costs of all creatives within a campaign/adset.


12-16-2016 07:16 PM #7 Mr Baffoe (Veteran Member)

From memory, passing FB data into 3rd party systems is most likely a no no. You will have to research that for sure. But not surprisingly they have no problem with you posting all sorts of data back to them

But if you encode gender and age into your custom variables that info will be available in Voluum or anyone other tracker.

The downside to this is if you use easy encodings, spy tools will be able to know your targeting. So think it through.

There's little risk that FB would steal your campaigns so that shouldn't stop you from posting conversion data back.

However, long term I can see how they may tweak your cpc up knowing you can afford it. For now, having conversion data in FB is great for creating lookalike audiences that match up to people who have already converted. This technique is huge for scaling. Also you will be able to stop showing ads to people who have already converted.

Unfortunately since this is for app conversions, you can't use regular pixels and need a server to server solution. FB doesn't have postbacks that I know of. But if you are able to get the Apple Advertising identifier or the android advertising id of your conversions, you can just use facebooks offline conversion tracking feature.

Hardly anyone talks about this, but I'm building this into Prosper202. Already did the same for google adwords conversions which allows you to track mobile conversions from adwords campaigns even though it's not your app.

Hopefully this helps


12-16-2016 07:20 PM #8 mihalis09 (Member)

Quote Originally Posted by Mr Baffoe View Post
having conversion data in FB is great for creating lookalike audiences that match up to people who have already converted. This technique is huge for scaling. Also you will be able to stop showing ads to people who have already converted.
I believe you do not need to post back conversions to have that ability. The pixel on the landing page should fire this info back to fbook to build custom audiences.


12-16-2016 07:21 PM #9 Mr Baffoe (Veteran Member)
Firing FB Pixel while directlinking - is this method legit?

Quote Originally Posted by mihalis09 View Post
I believe you do not need to post back conversions to have that ability. The pixel on the landing page should fire this info back to fbook to build custom audiences.
Correct. But with mobile there usually isn't a page to put pixels. It all happens server side.


12-17-2016 10:35 AM #10 flashpacker (Member)

Quote Originally Posted by mihalis09 View Post
Do you care to explain why for facebook specifically you would wanna post back conversions? The only reason I can imagine is that you see ROI per ad/creative specifically while if you check back on your tracker you only see ROI as an average of the costs of all creatives within a campaign/adset.
Yes, I just wanted to make it easy to see my ROI within Facebook but you make the excellent point that then Facebook has all my data.


12-17-2016 01:05 PM #11 flashpacker (Member)

Quote Originally Posted by Mr Baffoe View Post
But if you encode gender and age into your custom variables that info will be available in Voluum or anyone other tracker.
Ive been trying to do this but cannot seem to get it working. I have age and gender set in the Facebok traffic source in
Voluum like this:

Click image for larger version. 

Name:	Screen Shot 2016-12-17 at 14.04.27.png 
Views:	46 
Size:	35.4 KB 
ID:	13782

But it doesn't seem to pass this data from Facebook to Voluum. Am I doing this correctly or is there
something more I need to do?
Thank you in advance.


12-17-2016 06:46 PM #12 Mr Baffoe (Veteran Member)

Quote Originally Posted by flashpacker View Post
Ive been trying to do this but cannot seem to get it working. I have age and gender set in the Facebok traffic source in
Voluum like this:

Click image for larger version. 

Name:	Screen Shot 2016-12-17 at 14.04.27.png 
Views:	46 
Size:	35.4 KB 
ID:	13782

But it doesn't seem to pass this data from Facebook to Voluum. Am I doing this correctly or is there
something more I need to do?
Thank you in advance.
You will have to hard code the values because facebook has no tokens. so for example you'd need ?age=25-30&sex=male in the link you use in the fb ad


12-18-2016 12:19 AM #13 codefin (Member)

Quote Originally Posted by Mr Baffoe View Post
You will have to hard code the values because facebook has no tokens. so for example you'd need ?age=25-30&sex=male in the link you use in the fb ad
may i ask, how do you hide the custom token info so that it didnt pass to the network if you are direct linking? appreciate it, thanks.


12-18-2016 04:14 AM #14 zeno (Administrator)

Firing a Facebook pixel is never going to be "non-compliant". All you are doing here is tracking clickthroughs with a redirect, its normal and not dodgy at all.

If you want to track things like gender, age, etc. in your tracker then you need to hard code these values into ads. You can't hide this data from users. If you don't want it passed to the network, just don't pass it in the offer URL. You have to conciously choose to pass this data anyway.

The easiest way to do what you're aiming for here is to make a basic lander with the above code (OP's) and set the outgoing URL to your tracker /click URL, so its basically a lander that will get a ~100% CTR as it passes users onward to your offer.

You do not need to dynamically insert in Facebook values to the JS code, Facebook will attribute the events fine. All you are really doing is tracking clicks though, so it doesn't achieve much other than having users logged for audiences (e.g. people who clicked X ads). If you want to track conversions that have revenue, you're going to need your JS/img placed with the network. That is the pain point that is difficult to get around if the advertiser doesn't allow it.


12-19-2016 11:07 AM #15 flashpacker (Member)

Quote Originally Posted by Mr Baffoe View Post
You will have to hard code the values because facebook has no tokens. so for example you'd need ?age=25-30&sex=male in the link you use in the fb ad
Okay thanks, so I will need to create loads of separate adsets each targetting a specific demographic range and then hard code this
into the facebook ads so I can see where conversions are coming from?


12-23-2016 04:52 AM #16 zeno (Administrator)

^^ yes. You will need to put any details you want to pass forward in the URL parameters box for every ad. You can of course automate this a bit with the Power Editor and Excel (bulk ad uploading).


01-09-2017 10:10 AM #17 randomdude123 (Member)

One more question about this redirect landing page idea. In my example from above i put the redirect delay to 500ms since i read that i have to give the pixel enough time to fire first. Since i know/guess that faster is better:


Home > Paid Traffic Sources > Facebook & Instagram