Webasyst framework offers built-in integration with the Google Analytics service; therefore, to connect it to your website, simply enter your Google Analytics Property ID (provided in the form UA-123456-1) in the appropriate field in the “Site” app's settings.
How to add other web counters
1. Creation of a block with counter code
In the Webasyst framework it is convenient to organize such code snippets as common blocks.
- In the Site application open the “Blocks” section.
- Create a new block, enter an ID (Latin letters, digits, and underscore characters are accepted) and arbitrary description for the new block.
- Insert your counter code between these two lines and save the block.
2. Embedding counter in storefront templates
Once you save the block, an automatically generated line of code (helper) will appear in its upper panel, which you can use to embed your block in any frontend pages or templates of any Webasyst applications.
To get a web counter triggered on all website (storefront) pages, add that helper in design theme template index.html; for example, as shown in the picture below: