I am trying to add Google analytic for custom made visualforce page and a tab. Do you guys know, is it possible or is there any other way to I can track?



3 Answers 3


Yes, that's possible. Just put the code from GA in script tags on a VF page.

For added fun, make it a VF component with an attribute so you can throw it on any custom page you make with just

Bonus points: Think through how you want to handle sandbox hits and testing the GA stuff...we used a custom setting to store the ga property so that we could change it in sandboxes.


Yes we can use google analytics on custom made VisualForce page to track various events on the page. To provide you with a deep understanding this link will surely help you. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_site_googleAnalyticsTracking.htm


Still if you require any help then let me know.


Check this out. may be it will help for ya,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.