Internal Promotions
Standard PrestaShop banner and promotion modules lack native capabilities to track GA4 Enhanced Ecommerce promotion events. To measure promotional impressions (views) and clicks, apply a specific layout modification to your banner template and append tracking parameters to your target URLs.
- Part 1: Template Customization: Add a specialized CSS class to your promotion container. The tracking module reads this class to detect automatically when a banner appears on screen (impression) and when a user clicks it.
- Part 2: URL Parameters: Append descriptive marketing variables to each promotion link. The tracking module extracts these parameters to populate your GA4 e-commerce reports.
Required Proficiency
This configuration requires basic knowledge of HTML and familiarity with the PrestaShop file structure.
Template Customization
Never modify core module files directly. Perform a template override within your active theme directory to protect your customizations from being lost during future module updates.
PrestaShop prioritizes theme-level overrides over default core files. Core module templates reside by default in /modules/module_name/views/templates/. To override them, replicate that folder architecture inside your theme directory.
Overriding ps_banner
To customize the default PrestaShop Banner (ps_banner) module, copy the file template responsible for rendering the banner graphics:
- Source Core Path:
/modules/ps_banner/ps_banner.tpl - Target Override Path:
/themes/your_theme_name/modules/ps_banner/ps_banner.tpl
Open the copied file in your code editor. Locate the anchor tag (<a>) rendering the banner link. Add the CSS class js-track-promo to the parent container element of that <a> tag. If no parent container wrapper exists, create a new <div> element wrapper using that exact tracking class.
<a class="banner" href="{$banner_link}">
{if isset($banner_img)}
<img src="{$banner_img}" alt="{$banner_desc}" title="{$banner_desc}">
{else}
<span>{$banner_desc}</span>
{/if}
</a>
<div class="js-track-promo">
<a class="banner" href="{$banner_link}">
{if isset($banner_img)}
<img src="{$banner_img}" alt="{$banner_desc}" title="{$banner_desc}">
{else}
<span>{$banner_desc}</span>
{/if}
</a>
</div>
URL Parameters
The tracking module intercepts clicks and views by parsing specific query parameters appended to the promotion URLs. Build your promotion target links by including the parameters described in the specification table below.
Parameters Specification
| Parameter | GA4 Equivalent Attribute | Description |
|---|---|---|
pid |
Promotion ID | The unique identifier for the promotion (e.g., summer_sale_2026). |
pnm |
Promotion Name | The descriptive marketing name of the campaign (e.g., clearance_event). |
cnm |
Creative Name | The visual design or asset description (e.g., banner_blue_dress_jpg). |
csl |
Creative Slot | The layout position on the webpage (e.g., homepage_top_slider_1). |
ppid |
Product ID | Optional. The main product ID promoted inside the banner asset. |
ppaid |
Product Attribute ID | Optional. The specific combination or variant ID for the promoted product. |
Query String Structure
Format your URLs according to standard query string syntax rules. Use a question mark (?) to introduce the first parameter if the base URL contains no variables. Use an ampersand (&) to chain additional tracking parameters.
https://yourdomain.com/en/5-apparel?pid=summer_sale&pnm=apparel_offer&cnm=blue_banner&csl=top_slider&ppid=1&ppaid=0
https://yourdomain.com/en/5-apparel?q=size-s&pid=summer_sale&pnm=apparel_offer&cnm=blue_banner&csl=top_slider&ppid=1&ppaid=0