Notes: ⚠️⚠️⚠️
- Advanced integration
- Mastery of the e-commerce DataLayer
- Knowledge of GTM variables and their structure
- JavaScript skills for customization
- Access to product IDs in the e-commerce system
Product-category integration is an advanced solution that lets you segment and track conversions based on the types of products purchased.
What is a product categorization integration?
This integration consists of:
Segmenting products by business categories (e.g., Electronics, Apparel, Books)
Assigning specific Affilae KEYS to each category
Automatically calculating amounts by category for each order
Triggering the appropriate conversions according to the products in the cart
Technical prerequisites
Required configuration
E-commerce Data Layer correctly configured
Available variables
Integration is possible via manual implementation and via GTM.
GTM Integration (Client-side): with a Custom HTML tag.
Custom Integration (Native code): direct integration in the confirmation page code.
Example code
Below is an example implementation for 4 product categories:
Custom configuration
Define your categories according to your needs.
Example: Books, fashion, games, furniture, etc.
Map your product IDs
List all product IDs for each category
Use the IDs exactly as they appear in your DataLayer
Verify consistency with your available variables in the DataLayer
Configure your Affilae KEYS
One unique key per category
Format provided by your Affilae account manager
Testing is mandatory before going live
To find these elements, go to your program settings ➜ tracking ➜ integration via an Affilae module.
Points of attention
Data validation
Check your DataLayer structure.
Test with real orders.
Verify calculated amounts and the various category triggers.
Help
Tracking not working?
Untracked clicks: check the Program_ID
Missing conversions: verify dataLayer variables, product IDs, and KEYS.
Support