Such snippets enable data to be collected and reports generated. The actual data collected depends on the provider and the actual code snippet used. Example statistics include:

how many visitors over time

how many pages visited

search terms used

landing pages

Įspėjimas:

The Geometrixx-Outdoors demo site is configured so that the attributes provided in the Page Properties are appended to the html source code (just above the </html> endtag) in the corresponding js script.

If your own /apps do not inherit from the default page component (/libs/foundation/components/page) you (or your developers) have to make sure that the corresponding js scripts are included, for example by either including cq/cloudserviceconfigs/components/servicescomponents, or using a similar mechanism.

Without this, none of the services (Generic, Analytics, Target, etc) will work.

Creating a new Service with a Generic Snippet

For the basic configuration:

Open the Tools console.

From the left pane expand Cloud Services Configurations.

Double-click on Generic Analytics Snippet to open the page:

Click on the + to add a new configuration using the dialog; at a minimum assign a name, for example google analytics:

Click Create, the snippet dialog will open immediately - paste the appropriate javascript snippet into the field:

Click OK to save.

Using your new Service on Pages

Having created the service configuration you now need configure the required pages to use it:

You will be returned to the Cloud Services tab. The Generic Analytics Snippet is now listed with the message Configuration reference missing. Use the drop down list to select your specific service instance; for example google-analytics:

Click OK to save.

The snippet can now be seen if you view the Page Source for the page.

After a suitable period of time has elapsed, you will be able to view the statistics that have been collected.

Pastaba:

If the configuration is attached to a page that has child pages, the service is inherited by those as well.