How to Integrate Fundraise Up with the X (Formerly Twitter) Universal Website Tag
Conversion tracking allows you to measure your return on ad spend by tracking the actions people take after viewing or engaging with your ads on X (formerly Twitter). By setting up conversion tracking, you can also track cross-device conversions, ensuring accurate attribution even if someone views your Promoted Tweet on their mobile device but converts on their laptop.
Step 1: Add the X Universal Website Tag to Your Website
To use the universal tag:
- Create your conversion events inside X's UI.
- The Universal Website Tag will map to corresponding Fundraise Up events.
- Find the pixel ID in X's snippet generated after creating a new Universal Conversion Event.
Step 2: Send Checkout View Events to X
Fundraise Up's checkoutOpen
event maps to X's InitiateCheckout
event. Add the following JavaScript code to send Checkout View events to X:
1<script>
2 FundraiseUp.on('checkoutOpen', function(details) {
3 window.twq('track', 'InitiateCheckout', {
4 content_ids: [details.campaign.id],
5 content_name: details.campaign.name,
6 content_category: 'Fundraise Up'
7 });
8 });
9</script>
Step 3: Send Purchase Events to X
Fundraise Up's donationComplete
event is equivalent to X's Purchase
event. Add the following JavaScript code to send Donation Completed events to X:
1<script>
2 FundraiseUp.on('donationComplete', function(details) {
3 window.twq('track', 'Purchase', {
4 value: details.donation.amount,
5 currency: details.donation.currency,
6 content_ids: [details.campaign.id],
7 content_type: details.donation.recurring ? "Monthly Donation" : "One-time Donation",
8 content_name: details.campaign.name,
9 content_category: 'Fundraise Up',
10 num_items: '1',
11 order_id: details.donation.id,
12 status: 'completed!'
13 });
14 });
15</script>