Background
Inserting the Google Analytics (GA) script(s) into your template can track link clicks. Inserting a GA script into your donation page can show when donors attemplt donations. The best way to record successful donations in GA is to install a script into the thank you page that follows a donation. That's because the thank you page only appears for successful donations, and the donations that get there should be recorded in GA.
Solution
Here are some steps that you can use to install the GA code and configure it to pass donations to eCommerce.
- Edit a template used by thank you pages that follow donation pages. (If there are more than one then you'll need to repeat this process for each template.)
- Use the browser's search tool to locate the
</body>
tag. - Insert a blank line just before the
</body>
tag.
- Click here to see the page where the solution lives.
- When the page appears, click on the
Raw
button. A window will appear that only contains the solution.
- Copy the contents of the page and close the window.
- Paste the copied text into the newly inserted line in Salsa.
- Configure the script
- Replace
YOUR_DOMAIN
with the domain of our website (for examplewhatever.org
) - Replace
YOUR_GA_KEY
with your Google Analytics key (for example,UA-6666666-6
) - Save the page.
- Test!
Kudos!
A great big thank you to Brett Gerstein at Fliptide for going the extra mile and sharing a copy of a working script. Thanks, Brett!
Questions?
If you have any questions, then please gather this information.
- Your
organization_KEY
- Your
chapter_KEY
if you are in a chapter - The
template_KEY
of the modified template - The
thank_you_KEY
of a thank you page that uses the template - The URL of a donation page that uses the thank you page
- A screenshot of the page, if possible.
Send this information to support@salsalabs.com, and we'll be glad to help
Comments
Please sign in to leave a comment.