Back to catalog

Author:

Cloud4Wi Labs

Facebook Pixel integration

Advertising Pixel and trackers allow to identify anonymous users and create targeting audiences in your advertising platform. In this tutorial, we'll how to inject the Facebook Pixel in the guest WiFi portal so that you can retarget the store visitors with Facebook Ads.


More details on the use cases can be found here:

https://cloud4wi.zendesk.com/hc/en-us/articles/360035706472


What you need


1. Create your Pixel

Once you created your Facebook Pixel following FAcebook instruction, you need to copy the Pixel ID.


2. Deploy the App

To get started you can clone this GitHub repository and deploy the code on your own server. In that case, remember to initialize the environment variable "FB_PIXEL_ID" with the value of your Pixel ID.


In the alternative, you can use Heroku and take advantage of the Heroku Button below. Click the button below to install the app in a few clicks.



In the setup screen, enter your Pixel ID in the variable "FB_PIXEL_ID"

Once deployed, copy the link of your app. You can find it in the Setting tab.

3. Create a Cloud4Wi App

Login into MyApps using your developer account.

Create a new app, using the following settings:

  • App Visibility: Organization and Location level
  • Enable pre-authentication mode: checked


In the app endpoints, set the URL of your deployed app:



Note: remember to set the path of your app home page in the "Access Journey Page" input.

4. Publish your Cloud4Wi App

Log in to your Cloud4Wi Account. Go to Marketplace and click the Add button. Enter the App Id of your app and click Confirm to install the app in your Cloud4Wi

account. As the last step, publish the app in the Access Journey, on the Login Attempt or Sign-Up step, to present it to your customers during the WiFi access.