Installing Google Analytics Tracking Code

The popular and totally free Google Analytics service facilitates a very helpful and detailed analysis of the traffic frequenting your site.  Below is how and where you place the provided tracking code for best results on your ShiftCode GPT site (via the template).

First, sign in (or register and sign in) to your Google Analytics account.  Choose ‘Admin’ from the top Google Analytics menu.  From the center ‘Property’ menu dropdown choose “Create new property” to reach an ‘Administration > New Property” page and fill in the blanks on that page in reference to your new GPT site thereby creating a new Google Analytics property for the new site (if you have difficulties in this step then contact Google in regard to supporting their product ‘Analytics’ and it’s outside the scope of this document to support products by other entities) Click ‘Get Tracking ID’ to continue.

The code we are interested is located in the box just under the statement ‘This is your tracking code. Copy and paste it into the code of every page you want to track’  We don’t really need to place this code into every page as that statement implies.  All we need to do is insert that code into the HEAD section of our main ShiftCode site template and it will automatically be included on every page on your site.

It’s recommended (by Google) that you place this tracking code in the HEAD section of your template just before the closing “</head>” tag (as the very last item within the HEAD section of the template)
Head Section of the ShiftCode Main Template
In the above view depicts locating the ‘Files & Templates navigational menu in the lower right corner of the ShiftCode GPT Admin Panel, selecting ‘Templates’, and then selecting the template (clicking on its name) that shows as the ‘Default’ template (the one that has a ‘Yes’ in the ‘Default’ column.

Notice the “</head>” statement in line nine (9) of the example image above.  That is the closing HEAD section statement where we want the Google Analytics tracking code to be inserted just before.  Note we want to INSERT the code NOT replace ANY code that’s already located in your template (if you have trouble with this then we suggest you investigate the very basic (completely newbie) use of the ‘Insert’ key on your computer keyboard which may just need to be toggled to not replace text but actually insert text)

Ok, copy the Google Analytics code to your Windows clipboard, click just before the “</head>” statement (wherever it may be on YOUR template), press <Enter> (or <Return>) on your computer keyboard to drop the “</head>” statement down a line (and make sure that you are inserting instead of replacing code), and paste (<CTRL><V>) the Google Analytics tracking code in the empty space above the “</head>” statement.

After Google Analytics Code is Inserted

Your template code should look somewhat like the above example.  I’ve left the inserted code highlighted in grey only for the purpose of example here.  Now click the ‘Upload Template’ button to save your modified site template code (towards the bottom on you template editing page in the ShiftCode Admin panel) and you are now completely done adding the Google Analytics code to your site – congratulations!

Note that it may take a few minutes to an hour or more for the tracking code to become responsive to Google Analytics due to the ShiftCode ‘cache’ delay (a normal thing)