Skip to main content

How do I track visitors for reporting and social campaign management?

Setting up Google Analytics IDs and Facebook tracking codes

Written by David Gravina

We provide real-time stats on campaign performance via our built-in real-time dashboard however if you wish to track campaign success and conversion stats for your email and social campaigns, or run reports over time on your campaign then you'll need to add extra tracking codes from those platforms.

You can do this using a range of methods including:

Google Analytics IDs 

Add one or more Google property ID tags into the Google Analytics field found in the Advanced Tab of the Campaign you wish to track.

We support GA4 and you should insert the full tracking ID including the G- prefix.

Tracking form submissions

We use Google Analytics events for triggering a ‘completed' event. See Google docs. Note that if you redirect our actions to your own pages this event will not fire.

eventCategory
= actions
eventAction = completed
eventLabel = action URL


Tracking page views

Any time an action or a page is viewed we trigger a ‘pageview’ hit.

pageview
– we send a ‘pageview’ hit  for all page views on active campaigns with Google Analytics IDs configured. This includes action views, thank you pages and a campaign's content pages.

If you are embedding your actions you will need to configure the analytics yourself on the parent page, and add code to listen for messages passed from the Do Gooder iframe, for example:

// Google Analytics example assuming gtag has been initialised window.addEventListener("message", function (e) { 
if (e.data && e.data.source === "do_gooder") {
if (e.data.event === "page_view") {
gtag("event", "page_view", {
page_title: e.data.title,
page_location: e.data.url,
});
} else if (e.data.event === "action_complete") {
gtag("event", "form_submit", {
form_id: e.data.url,
});
}
}
});


Facebook

Add your Facebook Pixel ID tracking code to the Facebook field in the Advanced Tab of the campaign you wish to track.

We track both PageView and CompleteRegistration events (for action completion). ​

If you are embedding your actions you will need to configure the analytics yourself on the parent page, and add code to listen for messages passed from the Do Gooder iframe, for example:

<script> 
// Facebook/Meta pixel example assuming fbq has been initialised window.addEventListener("message", function (e) {
if (e.data && e.data.source === "do_gooder") {
if (e.data.event === "page_view") {
fbq('track', 'PageView') // if you aren't already tracking page views?
} else if (e.data.event === "action_complete") {
fbq("track", "CompleteRegistration", {
content_name: e.data.parameters.url,
});
}
}
});
</script>

We've added some new fields to the "Defaults" section of the account settings

Metapixel Troubleshooting

If you are encountering an issue where events are recording ("installed but hasn't fired recently"), these are the steps that you'll need to take.

You'll need to allow the Do Gooder campaign domain on your pixel in Meta Events Manager:

  • Meta Events Manager -> select the pixel (292056874684022) -> Settings -> Traffic Permissions -> add the campaign domain (accountname.good.do, or good.do) to the allowed list (or disable the restriction).

  • Reference: https://www.facebook.com/business/help/572690630080597 (article body is login-gated; exact UI steps to be confirmed against the live Events Manager).

Did this answer your question?