Google Tracking Id can be set for communities through Community Builder (advanced setting) however for communities that are on the 'Salesforce Tabs+ Visualforce' template community builder is not available.

How to set google analytics tracking no in this scenario. I guess it will need to be set directly through javascript into the visualforce page or is there any other better way.

1 Answer 1


This link has the details you are looking for

enter image description here

Also If you want to include it on multiple pages create a template out of it and include it in multiple pages.

  • The community i am in is using "Salesforce Tabs+ Visualforce" template , there is no way that I can find in config to set the Trackin ID ie: setting the UA-XXXX no: As per documentation this can be set through the Coummunity Builder. But if the template used is "Salesforce Tabs+ Visualforce" , community builder is not visible so this cannot be set this way, unless I am missing something. Once tracking id is set , it can be used in VF through the component <site:googleAnalyticsTracking>. Jul 10, 2017 at 3:48
  • Please read the first 3 steps from the instructions i pasted. Its showing the exact way to work around it.
    – RedDevil
    Jul 10, 2017 at 7:19
  • 1
    Thanks for investigating. The field 'Analytics Tracking Code' is available for site but not community. For communities its through community builder i guess this will need to be applied through custom javascript for instances where Community Builder is not available to set this value. Jul 11, 2017 at 0:50
  • You need to add a custom script tag to every page.
    – Bob Gali
    May 8, 2019 at 4:54

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.