Viewing 1 post (of 1 total)
  • Author
    Posts
  • Ninja Lead Moderator
    #189155

    Step 1: Create a Google Analytics account

    If you haven’t had one, you would need to sign up for a Google Analytics account. Visit Google Analytics page and then click the Create an account link on the top right of the page.

    Step 2: Generate Tracking Code

    Once you log into Google Analtyics, your next step is to setup your Joomla website and get the tracking code. Here are the general steps (again, you must be logged in to Google Analytics first)

    – Click Admin on the top right menu
    – Click New Account Button
    – Fill out all the details on the Create New Account page and then click Create Account button at the bottom of the page
    – You will then be redirected to a page with the current tab selected is Tracking Code. Find and copy the tracking code under section 2 into a text editor (for later use). Paste this code onto your site. It will look similar to this:

    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-243376-1']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

    Step 3: Paste the code in your JA template

    The instructions from Google say that paste the above tracking code right before the closing of your </head> or </body> tag. What you’ll need to do is edit your JA template and add this code before the closing </head> or </body>tag. Here are the 2 ways to do that:

    + You can add Google Analytics script into head.php file

    Open templates/ja_templates/tpls/blocks/head.php file

    + Or you can add it by configuration from Admin of JA Template:

    Go to Admin site -> Extensions -> Template Manager -> click Edit Your JA Templates ->Injection tabs.

    Add Google Analytics before </head> tag

    Add Google Analytics before </body> tag

    Step 4: Verify the tracking code

    Go back to your Google Analytics account, back to the Tracking Info Tab page that gave you the tracking code, refresh the page. If the tracking code was installed successfully, next to Tracking Status you should see a Tracking Installed message.

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  Ninja Lead 11 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum