AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.9K members online now
1.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Can we Add Analytics Code in Var.Js File?

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hey all,

 

Recently I got a website for optimization. So I want to implement analytics to my website. I have placed analytics code in var.js file. 

http://loveoflight.in/var.js

Analytics is tracking the information, but is there any problem for tracking and future implementation.? 

 

Any one tell me please.

 

Regards,
Mahesh . 

Can we Add Analytics Code in Var.Js File?

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆

as support page reads "While it's possible to download the JavaScript file (either analytics.js or ga.js) to examine it, storing or serving the JavaScript file locally is not recommended." The problem may be that your local script wouldn't support updated or new features.

 

by the way, as I can see now your tracking script snippet is implemented directly on the main page.