Workflow: Remarketing — Tracking Pixel Configuration
Modules involved: Remarketing · (MailWizz — indirect integration through custom fields)
Used by: Administrator · Marketing
Typical duration: One-time setup — 15 minutes per platform
Overview
Important: The Remarketing module is not a campaign tool and does not automate any messages or audiences. It is a tracking script manager — it allows inserting pixel codes (Google Ads, Meta/Facebook, LinkedIn Insight Tag) into CRMConnect pages via textarea fields.
The inserted scripts execute on every page load, without conditions. There is no segmentation, CRM event triggers, audience synchronization, or in-app reporting. Analysis is done exclusively in external platforms (Google Ads, Meta Ads Manager, LinkedIn Campaign Manager).
The only CRM integration: the show_on_remarketing field on custom fields — when checked, that field is included in the contacts/leads export to MailWizz for email campaigns.
Flow diagram
[SETUP — admin, one time per platform]
│
├── Setup → Marketing → Remarketing Google
│ ├── Field 1: "Remarketing script for Client Admin area"
│ │ → admin_client: injected in <head> on BOTH areas (staff + portal)
│ ├── Field 2: "Remarketing script for Staff area"
│ │ → admin: injected ONLY in the staff area
│ └── Field 3: "Remarketing in the B2B portal area"
│ → client: injected ONLY in portal + public forms
│
├── Setup → Marketing → Remarketing Facebook (same structure)
└── Setup → Marketing → Remarketing LinkedIn (same structure)
│
↓
[AUTOMATIC EXECUTION — on every page load]
│
├── Hook app_admin_head → injects admin_client + admin (Google + Facebook + LinkedIn)
└── Hook app_customers_head → injects admin_client + client (Google + Facebook + LinkedIn)
│
↓
[AUDIENCES AND RETARGETING — in external platforms]
│
├── Google Ads: audiences based on visitors (via Google Tag / gtag.js)
├── Meta Ads Manager: Custom Audiences based on pixel events
└── LinkedIn Campaign Manager: audiences based on Insight Tag
│
↓
[MAILWIZZ INTEGRATION — optional]
│
├── Setup → Custom Fields → field → check "Show on remarketing"
└── MailWizz → Campaigns → contacts export includes checked fields
[PIXELS ACTIVE ✓ · DATA COLLECTED IN EXTERNAL PLATFORMS ✓]
Step by step
1. Configure Google Ads Remarketing
Where: /admin/remarketing/google (admin only)
Available fields:
| Field | admin_client |
admin |
client |
|---|---|---|---|
| Injected in staff area | ✓ | ✓ | ✗ |
| Injected in client portal + public forms | ✓ | ✗ | ✓ |
What to insert in admin_client (recommended for global Google Tag Manager):
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];...})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>
What to insert in client (for conversions from the client portal):
<!-- Google Ads conversion tracking -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXX"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','AW-XXXXXXXX');</script>
2. Configure Meta (Facebook) Pixel
Where: /admin/remarketing/facebook (admin only)
Insert the Meta Pixel Base Code in the field corresponding to your purpose:
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){...}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'XXXXXXXXXXXXXXXX');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=XXXXXXXXXXXXXXXX&ev=PageView&noscript=1"/></noscript>
3. Configure LinkedIn Insight Tag
Where: /admin/remarketing/linkedin (admin only)
<!-- LinkedIn Insight Tag -->
<script type="text/javascript">
_linkedin_partner_id = "XXXXXXX";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);
</script><script type="text/javascript">...</script>
4. Custom Fields with "Show on remarketing"
Where: /admin/customfields → edit field → check Show on remarketing
The column show_on_remarketing = 1 in tblcustomfields signals the MailWizz module to include the values of that field when exporting contacts/leads lists.
When it is useful: if you have a custom "Industry" or "Budget" field on clients and want to segment MailWizz campaigns based on those values.
Injection logic (for technical reference)
The two hooks registered in remarketing.php:
| Hook | Where it executes | What it injects |
|---|---|---|
app_admin_head |
<head> of each admin/staff page |
admin_client + admin (Google + Facebook + LinkedIn) |
app_customers_head |
<head> of client portal + public web forms |
admin_client + client (Google + Facebook + LinkedIn) |
The admin_client field appears on both hooks — useful for global scripts (e.g.: Google Tag Manager container) that must be present everywhere.
Required permissions
| Action | Condition |
|---|---|
| Configure scripts (all fields) | is_admin() exclusively |
| Script execution on pages | Automatic — no permissions (all pages, all visitors) |
Gotchas
| Problem | Cause | Solution |
|---|---|---|
| Pixel not firing | Script saved with syntax errors | Check the script in Google Tag Assistant / Meta Pixel Helper |
| Pixel fires on staff pages too | admin_client injected on both areas |
Use client (not admin_client) if you want the pixel exclusively on the portal |
| Remarketing menu not appearing | Module inactive | Activate from Module Manager |
| Google Tag Manager vs. direct pixel | Both can be inserted | Recommendation: insert a single GTM container in admin_client and manage pixels from GTM |
Module references
- Marketing Campaigns — email campaigns (separate from pixel tracking)
- MailWizz — email marketing integration with custom fields export
- Custom Fields — the
show_on_remarketingfield
Verify the tracking pixel is firing correctly using the ad platform's tag debugging tool before any paid campaign launches — a non-firing pixel means retargeting audiences, conversion tracking, and lookalike expansion all fail silently from launch day.
Remarketing pixels require explicit user consent under GDPR. Ensure your website's consent management platform gates pixel activation after consent is granted — pixels running without consent on EU visitors can result in significant regulatory fines.