Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

{jr_google_ad} Index {jr_graph}

{jr_google_analytics}


The {jr_google_analytics} function is used for embedding the proper HTML and Javascript into a Jamroom Template so it records information for Google Analytics.  

 Tip: Google Analytics is a FREE service of Google - sign up for a free account and begin tracking all of your Jamroom activity!

Parameters

Name Type Required Default Description
id string no Config Setting By default, the {jr_google_analytics} Template Function will use the Google Analytics ID entered into the Jamroom Config -> System Settings Section.  If you would like to "override" this ID with an alternate ID, you can give it to the function using the "id" parameter.
page string no n/a By default, Google Analytics will figure out the name of the page to use in the Analytics tracking, but if you want to specify an alternate name, you can pass that name in via the "page" parameter.
assign string no n/a When the {jr_google_analytics} Template Function is run (that is the template it is embedded in is viewed), the HTML and Javascript code generated can be "stored" in a variable for use later in the template.  The name given to the "assign" function will be the name of the variable that can then be accessed in the template.
  Note: assign only works in Skin templates - not Profile Theme templates.

Configuration

All of the Jamroom Skins that are provided by Jamroom.net support Google Analytics "out of the box".  To "enable" the Google Analytics code, go to the Jamroom Config -> System Settings section and enter your Google Analytics ID:


Examples

Example embedding the {jr_google_analytics} template function into a Skin template:

{jr_google_analytics}

 Example embedding the {jr_google_analytics} template function into a Skin template and specifying an alternate Google Analytics ID:

{jr_google_analytics id="UA-246735-2"}

 

Customization - allowing your Artist and Members to use their own Analytics ID

If you would like to allow your Artist and Member profiles the ability to "track" their own hits to their pages using Google Analytics, here is a small guide on how to do it:

  1. The first step is to create a Custom Form Field in the Artist Form for "band_google_analytics".
    1. Log in to your Jamroom as the Master Admin.
    2. Click on "Jamroom Config"
    3. Click on "Custom Form Fields"
    4. Click on "Artist Profile"
    5. Near the bottom of the form where it says "New Field", enter:
      • "band_google_analytics" for the TITLE.
      • Select "Input Field" for the TYPE.
      • Select "All Quotas" for the QUOTA.
      • Save the new Custom Form Field by pressing the Save Changes button.
  2. The second step is to add the {jr_google_analytics} function call to the theme_footer.tpl file:
    1. Log in to your Jamroom as the Master Admin.
    2. Click on "Jamroom Tools"
    3. Click on "Template Editor"
    4. In the "Search Templates" field, enter "theme_footer".  Make sure you place a checkmark in the "Search File Name Only" Search Option, and press the "Search" button
    5. From the list of returned results, select the theme_footer.tpl file you would like to add the tracking to, and press the "Edit Template" button.
    6. Once editing the Template, you will want to scroll to the bottom where you see a {$HIDDEN_COUNTER} variable:

</body>
</html>

{$HIDDEN_COUNTER}
{/jr_unique_block}


Change it to:

</body>
</html>

{jr_google_analytics id=$BAND_GOOGLE_ANALYTICS}
{$HIDDEN_COUNTER}
{/jr_unique_block}

Then save the file and you are all set!  Now your Artist and Member profiles can enter their own Google Analytics ID in their profile and track their own page views.

{jr_google_ad} page 123 of 171 {jr_graph}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network