When you wish to track actions on your website via Facebook, you typically use the Facebook Pixel. This is the standard method and requires some coding to be implemented on the website, as well as the visitor’s consent to the use of cookies on the page.
With the Facebook Conversion API, you can track the same actions without cookies and browser restrictions. This is also known as server-side tracking.
OnlineFundraising now supports the following actions/events submitted as server-side with Conversion API, possibly in addition to the same events submitted through Facebook Pixel:
1. CompleteRegistration
Triggered after the form has been completed, but before payment.
2. Purchase
Triggered after a successful payment.
Preparation
1. Select which Pixel will receive server-side events. It can most easily be found at business.facebook.com under Event Manager.
1.a. Obtain a consent token. You can find this under Settings on your Pixel.
1.b. Get your pixel-ID
1.c. Verify Domain
The domain where you embed the OnlineFundraising forms must match the domain you have verified with your Facebook Pixel. This ensures that your events are processed correctly.
Read more about verifying here on Facebook
2. Enter the data under Settings in OnlineFundraising, as described here:
- Pixel ID: Your chosen pixel.
- API Token: Enter the consent token from the chosen pixel. See 1.a.
- Test Event Code: An optional code used when testing the setup in Facebook’s Test Events.
- Agreement Lifetime Value: A number used to multiply the value of subscription agreements. For example, if you expect an agreement to last an average of three years with a monthly frequency, multiply by 36. Please note that if you use many different frequencies and promotions, keep this set to 1, as we are not yet able to differentiate.
- Event Source URL: The domain to which your pixel is verified and where the OnlineFundraising form is embedded.
Deduplication
If you submit purchase events using the Facebook Pixel, it is important that they contain the same event ID (also referred to as the event ID) as used by the server-side setup, so that Facebook can deduplicate them.
Read more about it on Facebook.
Here, we use a GUID on the payment session initiated by OnlineFundraising. The easiest way to access this is via Tag Manager.
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 the dataSet GUID as a variable in your Tag Manager, you can create it as follows:
If you need additional help with Tag Manager, you can read this guide.
CompleteRegistration
(not available with OnlineFundraising without server-side)
Due to iOS, Facebook, and browser restrictions, it is not possible to send this event from OnlineFundraising in the traditional way using Pixel. Therefore, deduplication is not needed, as the event is only sent via server-side.
Use the following syntax for your Facebook Pixel event ID for the CompleteRegistration event:
EventID: event.pre.datasetGuid
Purchase
Use the following syntax for your Facebook Pixel event ID for the Purchase event:
EventID: event.post.datasetGuid
If you have any questions, please feel free to get in touch via support@onlinefundraising.dk.