To integrate with Mention Me on your SAP Commerce Cloud website, we recommend using our JavaScript tag-based integration configured via Google Tag Manager.
Alternatively, you can directly embed the Mention Me JavaScript tags into your SAP Commerce Cloud storefront by following our standard integration instructions.
These documents provide guidance on integrating Google Tag Manager with SAP Commerce Cloud:
- Integrating Web Analytics with your SAP Commerce Cloud Storefront - An Overview
- Implementing Google Analytics with SAP Commerce Cloud
To use Google Tag Manager with Mention Me, include customer and order-related variables in the tag container’s data layer. This guide assumes you have implemented the purchase action from Universal Analytics or GA4 Ecommerce.
Referrer Integration
You can configure the referrer JavaScript tag entirely via Google Tag Manager using variables, a trigger, and a tag.
Variables
The following variables are needed in the data layer:
| Parameter | Description | Example |
|---|---|---|
| Customer firstname | Customer's first name (URL-encoded) | Monica |
| Customer surname | Customer's surname (URL-encoded) | Collins |
| Customer email | Customer's email address (URL-encoded) | monicacollins195@mention-me.com |
| Order subtotal | Value excluding tax/shipping in currency specified | 95.75 |
| Order currency code | Currency in ISO 4217 format (e.g., ecommerce.currencyCode) | GBP |
| Order ID | Unique order ID (max 50 chars). e.g., ecommerce.purchase.actionField.id | 9947550576 |
| Customer locale | Language_country format (e.g., en_GB). See ISO 639-1 + ISO 3166-1 alpha-2. | en_GB |
Trigger
Create a purchase trigger using the “Page View” trigger type on the order confirmation page.
Tag
Create a Custom HTML tag using the following HTML:
<!-- Begin Mention Me referrer integration -->
<script type="text/javascript" src="https://tag.mention-me.com/api/v2/referreroffer/PARTNER_CODE?firstname={{ Customer first name }}&surname={{ Customer surname }}&email={{ Customer email address }}&order_number={{ Order ID }}&order_subtotal={{ Order subtotal }}&order_currency={{ Order currency code }}&situation=postpurchase&locale={{ Customer locale }}"></script>
<!-- End Mention Me referrer integration -->
Note: Replace PARTNER_CODE with your Mention Me partner code (e.g., mmxxx00000).
Ensure the variable names used in parameters match those defined in your GTM container’s data layer.
Adding the Custom HTML tag
Referee Integration
The referee integration enables Name Share: customers enter their friend’s name to claim an introductory reward.
Embed the referee tag on the checkout page.
Variables
| Parameter | Description | Example |
|---|---|---|
| Customer locale | Format: language_COUNTRY (e.g., en_GB) Uses ISO 639-1 and ISO 3166-1 formats. |
en_GB |
Trigger
Create a page view trigger on the checkout page, which will be used by the referee tag.
Tag
Create a Custom HTML tag using the following script:
<!-- Begin Mention Me referee integration -->
<script type="text/javascript" src="https://tag.mention-me.com/api/v2/refereefind/PARTNER_CODE?situation=checkout&locale={{ Customer locale }}"></script>
<!-- End Mention Me referee integration -->
Note: Replace PARTNER_CODE with your Mention Me partner code.
Update the {{ Customer locale }} variable as required to reflect the correct data layer variable in your implementation.
Adding the Custom HTML tag
HTML Changes
Add the following HTML placeholder to the checkout page (typically above the coupon code field):
<!-- Begin Mention Me referee placeholder div -->
<div id="mmWrapper"></div>
<!-- End Mention Me referee placeholder div -->
If you cannot add this placeholder directly, the Mention Me Onboarding team can help target an existing element on the page.
SAP Commerce Cloud Accelerators
If using the SAP Coupon Module, review the documentation for Coupons in Accelerator.
Update the JSP tag at: yacceleratorstorefront/web/webroot/WEB-INF/tags/responsive/cart/cartVoucher.tag
Alternatively, add the integration into: yacceleratorstorefront/web/webroot/WEB-INF/views/responsive/pages/cart/cartTotalsDisplay.jsp
SAP Spartacus
Customise the Cart Coupon component HTML and place the Mention Me div wrapper above: <div class="cx-cart-coupon-container">