LinkedIn Insight Tag + Conversions API — Documentation
LinkedIn Insight Tag + Conversions API connects your PrestaShop store to LinkedIn Campaign Manager so you can measure LinkedIn Ads against real store actions: product views, carts, checkout starts, sign-ups, searches, wishlists and purchases.
Features
- Insight Tag injection. The module loads LinkedIn's browser Insight Tag from
displayHeaderwithout editing theme templates. - Ecommerce event tracking. It tracks
PageView,ViewContent,AddToCart,StartCheckout,Purchase,Search,AddToWishlistandSignUpwhen the related event switches are enabled. - Order conversion hooks. Purchase tracking runs from
displayOrderConfirmationandactionValidateOrder, with order value, currency and a stable event ID. - Add-to-cart coverage. Add-to-cart events are detected from PrestaShop's
updateCartJavaScript event bus and classic add-to-cart buttons. - Wishlist coverage. Wishlist adds are detected from common wishlist buttons and
WishlistEventBuswhen the theme or wishlist module exposes it. - Per-event conversion rules. Each standard event can use its own LinkedIn Campaign Manager conversion rule ID.
- Conversions API queue. Server-side events are stored in the shared
mpr_conversion_queuetable under providerlinkedinand processed by the scheduled tasksend_linkedin_conversions. - Browser and server deduplication. Matching event IDs are used so LinkedIn can deduplicate browser and Conversions API versions of the same conversion.
- Custom event rules. Click, URL, controller/module and DOM-event rules let you measure quote buttons, forms, downloads, configurator steps or other store-specific intent signals.
- Consent and staff controls. Tracking can wait for MPR cookie marketing consent and can avoid injecting tracking for logged-in back-office employees browsing the storefront.
- Back-office diagnostics. The configuration page shows Partner ID, Purchase conversion rule and Conversions API readiness, queue counts, recent queue rows, an API probe and a failed-event retry action.
Configuration options
- Enable LinkedIn Insight Tag. Master switch for browser LinkedIn tracking; default:
0. - Partner ID. Numeric LinkedIn Partner ID from Campaign Manager > Account Assets > Insight Tag; default: ``.
- Exclude employees. Prevents tracking injection while a logged-in back-office employee browses the front office; default:
1. - Respect cookie consent. Waits for marketing consent from
mprcookiesrevolutionormprcookiebannerwhen either module is active; default:1. - Track PageView. Sends the base page visit event after the Insight Tag loads; default:
1. - Track ViewContent. Tracks product detail page views with product ID, name, category, price and currency; default:
1. - Track AddToCart. Tracks native and AJAX add-to-cart actions; default:
1. - Track StartCheckout. Tracks checkout entry with cart value, item count, currency and line items; default:
1. - Track Purchase. Tracks completed orders from order confirmation and order validation hooks; default:
1. - Track Search. Tracks search result pages when a query is present; default:
1. - Track AddToWishlist. Tracks wishlist add actions from common wishlist buttons and event buses; default:
1. - Track SignUp. Marks new customer account creation and sends the sign-up event on the next customer account page load; default:
1. - ViewContent conversion ID. LinkedIn conversion rule ID for product view events; default: ``.
- AddToCart conversion ID. LinkedIn conversion rule ID for add-to-cart events; default: ``.
- StartCheckout conversion ID. LinkedIn conversion rule ID for checkout-start events; default: ``.
- Purchase conversion ID. LinkedIn conversion rule ID for purchase events; default: ``.
- Search conversion ID. LinkedIn conversion rule ID for search events; default: ``.
- AddToWishlist conversion ID. LinkedIn conversion rule ID for wishlist events; default: ``.
- SignUp conversion ID. LinkedIn conversion rule ID for account creation events; default: ``.
- Track custom events. Enables the JSON custom event rules field; default:
0. - Custom event rules. JSON array of custom click, URL, controller or DOM-event rules; default: ``.
- Enable Conversions API events. Queues eligible events with conversion rule IDs for server-side sending to LinkedIn; default:
0. - Conversions API access token. LinkedIn Conversions API token used for server-side delivery; default: ``.
- LinkedIn API version. LinkedIn Marketing API version in
YYYYMMformat; default:202605. - Send IP address match key. Sends IPv4 address as a LinkedIn match key when Conversions API events are built; default:
1. - Queue batch limit. Maximum queued LinkedIn events processed per run, from
1to100; default:20.
Customization examples
LinkedIn conversion rule IDs can be entered as a plain numeric ID or as the full LinkedIn URN. The module stores the numeric part internally.
12345678
urn:lla:llaPartnerConversion:12345678
Custom click rule for a quote request button:
[
{
"event": "QuoteRequest",
"conversion_id": "12345678",
"trigger": "click",
"selector": ".quote-request-button",
"params": {
"location": "product_page"
},
"capi": true
}
]
Extra parameters can be placed directly on the clicked element:
<a class="quote-request-button"
data-linkedin-param-location="product"
data-mprlnin-param-product_id="123">
Request a quote
</a>
URL-based custom rule for a catalogue download or quote page:
[
{
"event": "QuotePageView",
"conversion_id": "12345678",
"trigger": "url",
"contains": ["/request-a-quote"],
"once": true,
"capi": true
}
]
Controller/module rule for a checkout module page:
[
{
"event": "CustomCheckoutStep",
"conversion_id": "12345678",
"trigger": "controller",
"controllers": ["checkout"],
"modules": ["mprcheckoutrevolution"],
"params": {
"step": "checkout"
},
"once": true,
"capi": true
}
]
DOM-event rule for JavaScript integrations:
[
{
"event": "GalleryView",
"conversion_id": "12345678",
"trigger": "event",
"dom_event": "mpr:gallery:view",
"capi": true
}
]
document.dispatchEvent(new CustomEvent('mpr:gallery:view', {
detail: {
params: {
gallery: 'main',
product_id: '123'
}
}
}));
You can also call the storefront helper after the module has loaded. For a custom event name, include conversion_id unless the event name matches one of the built-in conversion ID mappings.
window.mprlninTrackCustom('DemoRequest', {
conversion_id: '12345678',
product_id: '123',
currency: 'USD'
}, {
capi: true
});
If you run the shared cron system manually, the LinkedIn queue task is registered as:
send_linkedin_conversions
schedule: every:300
provider: linkedin
table: _DB_PREFIX_ + mpr_conversion_queue
Installation
- Download the module ZIP from your mypresta.rocks account.
- In PrestaShop Back Office, go to Modules > Module Manager.
- Click Upload a module and select the ZIP file.
- After installation, open the module configuration page.
- Add your LinkedIn Partner ID, enable tracking, save, then add the conversion rule IDs you want LinkedIn Campaign Manager to count.
- If you use Conversions API, add the access token, save, send the API probe, and check that the diagnostics panel reports the expected status.
How it works in your store
After setup, visitors do not see a new storefront widget. The module adds the LinkedIn Insight Tag and event listeners in the page header, captures the li_fat_id click parameter when LinkedIn sends one, and maps PrestaShop activity to LinkedIn events.
In the back office, you see the tracking switches, conversion rule fields, custom event JSON field and Conversions API diagnostics. Queue statuses are shown as pending, sending, sent and failed; failed events can be returned to the pending queue from the module page.
Honest limits
LinkedIn reporting depends on data from LinkedIn Campaign Manager. The module can send events only after you provide the correct Partner ID, conversion rule IDs and, for server-side delivery, a valid Conversions API token.
Consent settings are respected for supported MPR cookie modules. If another consent tool blocks scripts in a different way, you may need a custom event or consent integration.
Conversions API improves event delivery, but LinkedIn still needs usable match data such as click ID, hashed customer details or IPv4 address where your policy allows it. Server events without usable match identifiers may be rejected or may not improve attribution.
Custom events need stable selectors, URLs, controller names or DOM events. If a theme changes button classes or a third-party module replaces checkout markup, update the custom rule to match the new page.
Frequently Asked Questions
Do I need Conversions API?
The browser Insight Tag is enough for website demographics and basic retargeting. Conversions API is recommended when LinkedIn Ads attribution matters, especially for purchase reporting.
Can browser and server events double count?
The module uses matching event IDs so LinkedIn can deduplicate browser and server versions of the same conversion.
Can it track gallery browsing or quote buttons?
Yes. Use custom events with selector, URL, controller/module or JavaScript-event triggers.
Does it work with Checkout Revolution?
Yes. Native checkout start and purchase events are tracked, and extra checkout-module interactions can be mapped as custom events.
What happens if LinkedIn rejects a server event?
The event remains in the queue with its HTTP code and last error. Failed events can be retried from the module configuration page.
Compatibility: PrestaShop 1.6 to 9.0 (latest), PHP 7.1+. We continue to support upcoming PrestaShop versions.