Tracking

Facebook Conversion API

Senest redigeret:

When you wish to track actions on your website on Facebook, you usually use Facebook Pixel. This method is standard and requires some coding in order to be inserted on the website, and for the visitor to accept the use of cookies on the page. 

With the Facebook Conversion API you can track the same actions without cookies and browser restrictions. It is also called serverside tracking

OnlineFundraising now supports the following actions/events submitted as serverpage with Conversion API, possibly in addition to the same events submitted through Facebook Pixel: 

1. "completeRegistration" 

After the form is completed but before payment.

2. "Purchase" 

After successful payment.

Preparation  

1. Select which Pixel will receive serverside events. It is most easily found on businees.facebook.com under "event manager". 

1.a. Get a consent token. You can find it under settings on your pixel. 

Viftrups_Pixel.png

1.b. Get your pixel-ID 

Sk_rmbillede_2021-06-02_kl._14.31.48.png

1.c. Verify domain 

The domain you put the OnlineFundraising forms in, must be consistent with the domain you have verified with your Facebook Pixel. In this way, you are assured that your events go through. 

image4.png

Read more about verifying here on Facebook 

2. Insert data under settings in OnlineFundraising, as described here: 

image3.png

1. Pixel ID: Your chosen pixel.

2. API token: Insert consent token from the chosen pixel. See 1.a. 

3. Test Event Code: Optional code for when you want to test setup in Facebook "test events". 

4. Agreement Lifetime Value: A number you want to multiply the value of subscription agreements with. For example, if you expect an agreement to last an average of three years with monthly frequency, multiply by 36. Please note, that if you use many different frequencies and promotions, keep it at 1, as we cannot yet differentiate. 

5. Event Source URL: The domain you have verified your pixel to and inserted the OF-form on. 

Deduplication

If you submit purchase events with Facebook pixel, then it's important that they contain the same event ID (also called event ID) as the serverside uses, so that Facebook can duplicate them. 

Read more about it on Facebook.

image2.png

Here we use a "guid" on the payment session from OnlineFundraising, which is initiated. The easiest access is through Tag Manager.

Here you can adjust the event ID of the "purchase", which is sent with Facebook Pixel, for example in the following way:

datasetguid.png

Or directly in a customHTML field: 

fbq('track', 'Purchase', {
value: {{OF Amount}},
currency: 'DKK'
}, {
eventID: 'event.post.'+{{OF DataSet Guid}}
});

If you don't have dataSet Guid as a variable in your Tag Manager, you can create it in the following way:

Google_Tag_Manager.png

If you need additional help with Tag Manager, you can read this guide.

CompleteRegistration (not available with OF without serverside)

Due to IOS, Facebook, and browser restrictions, it is not possible to send this event from OnlineFundraising in the traditional way using Pixel. Therefore no duplication is needed as the event is only sent to "serverside". 

Use the following syntax for your Facebook pixel eventID for CompleteRegistration event: 

EventID: event.pre.datasetGuid 

Purchase

Use the following syntax for your facebook pixel eventID for purchase event: 

EventID:event.post.datasetGuid

Do you have any questions? Then feel free to write to support@onlinefundraising.dk.

 

 

Was this article helpful?

0 out of 0 found this helpful