Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Use Generic Analytic Snippets for author

Avatar

Level 1

Hi All,

Is it possible to include a Generic Analytic Snippet in author??

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/administer/integration/external-providers.html

// It talks about Analytics with External Providers in AEM.

    All you need to do is to create Creating a new Cloud Services Configurations with a Generic Snippet

Check the documentation, it covers everything.

~kautuk



Kautuk Sahni

View solution in original post

4 Replies

Avatar

Correct answer by
Administrator

Have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/administer/integration/external-providers.html

// It talks about Analytics with External Providers in AEM.

    All you need to do is to create Creating a new Cloud Services Configurations with a Generic Snippet

Check the documentation, it covers everything.

~kautuk



Kautuk Sahni

Avatar

Level 4

Hi, Bhanu

I think you are looking for this. 

http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

And, there is also another work around for this, just get your GTM library and place that inside the <head> section of your page. 

The example snippet looks like this,

<!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXX');</script> <!-- End Google Tag Manager -->

There might be <noscript> version of library as well for the browsers with JavaScript disabled. You can place that snippet right after the start of <body> tag of your page. 

<!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) -->

Also, you can use different versions based on runmode for your non-prod and production by checking ${runMode == 'prod'} or ${runMode != 'prod'}.

Hope this helps.

Thanks,

Vamsi

Avatar

Level 4

Hi Bhanu

Any luck with this? 

Avatar

Level 1

Hi Vamsi,

My requirement is actually not associated with a page may be a jsp. Requirement is to generate a report of all the keywords that are searched in the "Asset Search" (Assets-> Select a path and "Enter Keyword" and other filters if required).  I tried DTM but it requires Adobe Analytics access. Checking if there is any other way.

PFA.