Deploying Google Analytics With Django

后端 未结 10 1227
遇见更好的自我
遇见更好的自我 2020-12-23 11:29

We\'re about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don\'t want all of the hits on developmen

10条回答
  •  忘掉有多难
    2020-12-23 12:09

    Instead of including the script tag directly in your html, just change the analytics javascript so it only runs if the href does not contain your prod site's name. This will work without any extra configuration.

提交回复
热议问题