Knowledge Base

e-Commerce and Event Tracking

In addition to having advanced tracking capabilities via our own Custom Short Urls, each Funraisin powered site supports the ability to send through event and e-commerce data to platforms like Google Analytics and Facebook without requiring the need for developers to add bespoke code to individual pages. Currently we support the following e-commerce tracking methods:

  • GA (Google Analytics)
  • GTAG (Google Analytics as of April 2017)
  • GA4 (Universal Analytics as of July 2023)
  • GTM (Google Tag Manager)
  • Facebook
  • AutoPilot

It is also possible to implement custom tracking on most of your site’s pages however this article only covers our standard tracking feature.

Pixel and Event Based Tracking

This covers Google Analytics, Google Tag Manager, GA4 and Facebook Pixel.

 

Step 1. Adding your tracking tags

Before we can send data to your other platforms you will need to upload your tracking tags to your platform. These can be uploaded via Platform Setup > Tracking and Analytics as the illustration below shows. Simply select which tracking tags you wish to add and paste in the code provided by each platform.

 

You can also add in other custom tracking tags using the “other tracking code” option and specifying where on the page you wish for the code to appear, e.g.,etc.

 

Step 2. Defining the e-commerce data method for Google Analytics

For Google tracking we support GA, GTAG, GA4 and GTM tags, so in order for us to send through the correct data you will need to tell us which method to use. Note that as of April 2017 Google will provide you with GTAG tracking tags by default however we do support the older GA tracking.

If you aren’t sure which method is best for your site please feel free to ask us for assistance.

Defining your tracking method can be done from Platform Setup > Tracking and Analytics > Event and E-commerce Tracking as shown below.

 

Step 3. Standard E-commerce & Event Data

Once your tracking tags have been added to your site we will start to send through the following e-commerce and event data to the tracking method chosen for Google and to the Facebook Pixel. This data will be sent if the tag has been set up in Platform Setup > Tracking and Analytics 

For help with setting up your tracking within Google see this article.

Google Tag Manager data layer

Sponsored Donations

Sponsored donations are ones made from someone’s fundraising page.

// Create Pageview
dataLayer.push({
    ‘event’: ‘VirtualPageview’,
    ‘virtualPageURL’: ‘/sponsor/confirmation/{tax_ref}
});

// E-commerce data
dataLayer = [{
    ‘ecommerce’: {
    ‘currencyCode’:platform_currency,
    ‘purchase’ : {
       ‘actionField’: {
          ‘id’: donation_id,
          ‘revenue’: d_amount,
          ‘type’: donation_type // ‘online’, ‘recurring’, or ‘personal’
          ‘payment_method’:payment_method,
          ‘po_number’: po_number,
          ‘tax_ref’: tax_ref
       },
       ‘products’: [{
          ‘name’: ‘member’, team’, or ‘organisation’,
          ‘id’: online event's event_code or DIY's category_name,
          ‘price’: d_amount,
          ‘category’: ‘Personal Donation’ or ‘Sponsored Donation’,
          ‘quantity’: 1,
       }]
    }
}
}];

// event
dataLayer.push({
    ‘event’: ‘donation’
    ‘eventMeta’: ‘Personal Donation’ or ‘Sponsored Donation’,
    ‘eventCode’: online event's event_code or DIY's category_name,
});

Non-Sponsored Donations (Generic Donations)

Non-Sponsored donations are donations made to a generic donation / crowdfunding page.

// e-commerce
dataLayer = [{
 ‘ecommerce’: {
 ‘currencyCode’: platform_currency,
 ‘purchase’ : {
    ‘actionField’: {
       ‘id’: donation_id,
       ‘revenue’: d_amount,
       ‘payment_method’: payment_method,
       ‘po_number’: po_number,
       ‘frequency’: Weekly’,‘Monthly’, ‘Yearly’, or ‘one-off’,
       ‘type’: donation_type // online, or recurring

    },
    ‘products’: [{
       ‘name’: page_name,
       ‘id’: event_page_id or page_id,
       ‘price’: ‘d_amount’,
       ‘category’:Donation,
       ‘quantity’: 1,
      
}]
    }
}
}];

// event
dataLayer.push({
‘event’: ‘donation-success’,
‘eventMeta’: ‘Donation’
});

Online Event Registrations

On the registration completion lightbox:

// e-commerce data
dataLayer = [{
  ‘ecommerce’: {
  ‘currencyCode’:platform_currency,
  ‘purchase’ : {
  ‘actionField’: {
     ‘id’: ‘history_id’,
     ‘revenue’: ‘total_paid’,
     ‘po_number’: po_number,
     ‘payment_method’: payment_method,
     ‘tax_ref’: ‘tax_ref’,
     ‘hashed_email’: hash(m_email),

  },
‘products’: [{
    ‘name’: event_name,
    ‘id’: event_code,
    ‘price’: total_paid_entry,
    ‘category’: ‘Registration’,
    ‘quantity’:`1`,
    ‘brand’: event_code
    
 }
 // optional donation
 ,{
    ‘name’: event_name,
    ‘id’: event_code,
    ‘price’: m_donation_amount,
    ‘category’: ‘Personal Donation’,
    ‘quantity’:`1`,
    ‘brand’: event_code

    }
// optional merchandise
,{
    ‘name’: event_name,
    ‘id’: event_code,
    ‘price’: total_paid_merchandise,
    ‘category’: ‘Merchandise’,
    ‘quantity’:`1`,
    ‘brand’: event_code

    }

]}}}];

// Event
dataLayer.push({
    ‘event’: ‘registration’,
    ‘eventMeta’: ‘Event Registration’,
   
‘eventCode’:event_code,
});

// optional donation
dataLayer.push({
    ‘event’: ‘donation’,
    ‘eventMeta’: ‘Personal Donation’,
   
‘eventCode’: event_code,
});

URL Based Tracking

In addition to the event and e-commerce data that we send through, you can also setup your own funnels and goals for various activity types on your site. The urls for each “journey” can be found within your platform when editing events, however below is a list of confirmation page urls that can be used.

Sponsored Donations

https://yoursite.com/fundraiser/
https://yoursite.com/sponsor/processpayment
https://yoursite.com/sponsor/confirmation/ (Pseudo pageview)

Generic Donations

https://yoursite.com/
https://yoursite.com/processdonation
https://yoursite.com/processdonation/confirmation/ or
custom url

Online Event Registrations

https://yoursite.com/register//
https://yoursite.com/register/fundraising/
https://yoursite.com/register/merchandise/
https://yoursite.com/register/teamdetails/
https://yoursite.com/register/entries/
https://yoursite.com/register/waves/
https://yoursite.com/register/pay/
https://yoursite.com/register/eventconfirmation// or
custom url

Offline Event Registrations

https://yoursite.com/event/register/ or
https://yoursite.com/event/tickets/ or
https://yoursite.com/event/rsvp/

Facebook API

In addition to supporting Facebook pixel and  Facebook events you can also choose to use the Conversions API which is a slightly more robust method of tracking events since as of June 2021 Facebook pixel events won't be fully supported on all IOS devices.

When we say IOS devices what that really means though is that for some users that might be interacting with your website via the built in Facebook App on their iPhone, you might not be able to accurately track conversions e.g. CompleteRegistrations etc so using the conversions API is a way to get around this.

If you’d like further help please pop in a support ticket from your Funraisin admin and our team will assist you.