Embed Google Analytics or other JavaScript tracking code on your public-facing pages via Admin -> DB Management -> Embedded JavaScript -> Manage embedded JavaScript.
There are two different types of embedded JavaScript in CampSite:
- Globally embedded JavaScript
- Page-specific embedded JavaScript
Globally embedded JavaScript will be loaded on every public-facing page for your CampSite account. A public-facing page is any non-administrative page - such as the camper Request For Information form, the Parent Dashboard, Staff Dashboard or Camp Today. This feature is useful if you wish to use one snippet to track user traffic across all of CampSite.
Page-specific embedded JavaScript allows you to load JavaScript on specific pages of the Parent or Staff Dashboard, such as the Request for Information form or the enrollment confirmation page. This is useful for tracking key metrics and conversions, such as the number of parents who completed an enrollment after clicking an advertisement.
Please use the designated sections of the Embedded JavaScript page for global vs. page-specific JavaScript, as shown above.
Frequently Asked Questions about Embedded JavaScript in CampSite
I have some tracking code from Google Analytics (or Facebook Pixel, or any other service), and I don't know what to do with it.
Because of the complexity involved with properly configuring Google Analytics and other analytics tools, CampSite Support is unable to help camps validate or modify their JavaScript code.
Camps who need assistance with setting up their tracking code should consult with an IT or web design professional. The tools exposed on CampSite's Embedded JavaScript page offer a tremendous amount of flexibility in configuring tracking code, but improperly entered JavaScript can impact or break the user experience on public-facing pages. Please use caution and be sure to test pages after making changes to your embedded JavaScript.
My Embedded JavaScript loads an external script, is this supported?
Many analytics services rely on loading external scripts to function. CampSite automatically wraps content entered in the Embedded JavaScript page in <script> tags, which may break snippets that contain references (e.g. <script src="an-external-file.js" />) to external scripts.
A workaround for this is to add a </script> tag in the beginning of the content area, and add a <script> tag at the bottom. This isolates your content from the <script> tags surrounding it and allows for more advanced functionality, such as loading external scripts. For example:
</script>
<!-- your content goes here... -->
<script>
I entered some JavaScript into the Embedded JavaScript page, and it's not working correctly.
Because of the complexity involved with properly configuring Google Analytics and other analytics tools, CampSite Support is unable to help camps validate or modify their JavaScript code. Camps who need assistance with setting up their tracking code should consult with an IT or web design professional.
Comments