vendredi 27 mai 2016

Is it okay to wrap my google analytics code in an if statement? Not sure if it's receiving data from my site

Is it okay to wrap my google analytics code in an if statement? Not sure if it's receiving data from my site now. I have a small site that I developed that uses google analytics. I did this

local = os.getenv('_system_name')
context = {
    ...
    'local': local

}

and in my base.html template

   Liquid error: Unknown operator local

earlier I tested it by putting some code to make sure it showed when its not local. But now it seems like all the data has stopped. And I know that I have been getting traffic? This was earlier around 6 p.m. friday it's 12:30 now usually after 12 at night the system updated. Should I not have the script in an if statement or should I not worry because google systems may be updating or something. Thanks. And if some people want to know why I did that it's so I wouldn't have to keep commenting the code every time I performed a git push

Aucun commentaire:

Enregistrer un commentaire