I am trying to add Google analytics script code by using SXA OOB feature. I found that template is available at the path /sitecore/templates/Feature/Experience Accelerator/Analytics/Rendering Parameters/Google Analytics

Any inputs on how to enable Google Analytics tracking in SXA?

  • You can use the ootb component and add the GA key.. what is your actual question?
    – Gatogordo
    Nov 12, 2018 at 11:47

1 Answer 1


The Google Analytics component should be added to the Metadata partial design, which is included by default in sites.

To add the component, in Experience Editor go to the Metadata partial design:

Selecting the Metadata Partial Design

This will give you a view of the current metadata renderings you have selected for your site, and allow you to drag metadata components into the <head> or <body> tags of your site's page layout.

The Google Analytics component can be found in the toolbox under Analytics:

Google Analytics component

Drag this into the <head> section of the page. When you add this, the rendering will inform you that you must add a key for this to work:

The Google Analytics component before a key is added

To add the key, this is set as a rendering parameter on the component, under the Tracking heading:

Adding the tracking key to the component properties

Once that's done you can save the partial design and your site should start outputting the tracking code.

  • Thank you,, This is what i am looking for.
    – Hussain
    Nov 13, 2018 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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