Google offers a way to use data from their display advertising network to segment users according to demographics:
https://support.google.com/analytics/answer/2444872
Enabling it requires a few things, but the blocker for me is that one of them involves changing the code to load the analytics JS (since NB uses ga.js it involves changing the source of the JS, for universal it's just adding a call before tracking the page view)
Is there a way to do this without doing all the GA code myself? And if I have to do that, how do I get the goal functionality back?
Sean,
You should be able to remove the NationBuilder-generated tracking code, and use Google's modified tracking code given in their example (make sure to use your actual tracking ID and site URL). Swapping out the tracking code should not affect your goals functionality.
Removing NationBuilder-generated tracking code
Go to Website → Site settings → Analytics setup, remove the Google Analytics tracking code, and save the page.
Adding custom Google Analytics tracking code
If you're using a stock theme:
- Go to Website → Theme → New custom theme
- Clone your current theme
- Go to Website → Current custom theme → Templates → layout.html
- Add the custom Google Analytics tracking code before the closing </head> tag, and save and publish the page.
If you're using a custom theme, skip steps 1 and 2 above, and simply modify your layout.html template as described in step 4.
Showing 3 reactions
Sign in with
CampaignSync - Sync NationBuilder contacts to MailChimp
Lincoln Bot - A Slack companion to your nation
Certified Developer