category command you can track which product categories your visitors viewed in your web store. It has to be called on the category page your visitors open and should pass the
categoryPath parameter to Emarsys.
Emarsys uses the data collected with this command for category recommendations in Predict.
What happens with this data?
When your users open a category page, Predict uses the
categoryPath parameter to find the top recommendations to present in the category widget.
Who should I involve on my side?
category command is implemented on the store frontend, for which you will need a frontend developer. It is a single script, taking a single parameter:
How can I monitor if it works fine?
The Data Sources page is your starting point for troubleshooting any integration issues and monitoring your Web Extend implementation. It displays warning and error messages if there are issues with the command, while it allows you to monitor your visitors’ activity, including product views, in real time in a live ticker.
On the Data Sources > Site Traffic page, you can get an overview of the total product views in a selected period and compare it to your in-house website statistics.
testMode command to prevent test data from being written to your real contact database as this may skew your reporting.
- Issue the command only once on each category page.
- Do not use the category command on the single product pages.
- If you have a dedicated m.domain.com mobile page and a mobile app, do not forget to add the command to these as well. For mobile apps, use our SDK.
Check if it works
To see if the
category commands work properly on your website, do the following:
- In your browser, open a category page on your website.
- Open another tab in your browser, log in to your Emarsys account, go to Admin > Data Sources > Web Behavior and click Live Events in the upper right-hand corner. This will open the Live Events page.
- Select category views in the first drop-down and my visit in the second.
- You should see an event box containing a UTC timestamp, a cookie ID, the referring URL and a category box with the product you saw on the website.
If you have Predict enabled, you will also see a widget with the top Predict recommendation from the given category.
You can also install our Inspector bookmarklet that allows you to monitor live the Web Extend commands called on your website. If you implemented the
category command correctly, it should appear in the Inspector overlay on all the category pages, and only on these pages.
If everything works as expected, deploy the code to your live environment.
Always remember to remove the
testMode command from your code first!
In this section, you can read about the tools you can use and the things you can do to check if the
category command is doing its job properly on your website.
Once your JS implementation has gone live, the Live Events ticker will start showing data in the Web Behavior box of the Data Sources page. The ticker should now show product views in real time.
Live Validator is a tool that checks if the Web Extend scripts are doing their job properly and if the live data they are picking up on your website is consistent with those found in your product and contact databases. The Live Validator page displays the results of these validation checks (more than a hundred of them) to help you troubleshoot any issues.
- Check if Live Validator has any warnings or error messages related to the
- If it does, fix the issues or contact Emarsys support if you need help.