A dynamic macro is a variable inserted into an advertising destination URL.
When a user clicks on an ad, the advertising platform automatically replaces these macros with real values related to media delivery.
In the case of Meta, these values could correspond, for example, to:
- the campaign ID;
- the ID of the ad set;
- the advertisement ID;
- the source of dissemination;
- possibly certain labels or media attributes.
The goal is to transmit this information to Eulerian in order to analyze media performance, to link clicks with conversions, and to synchronize data from Meta.
In this URL, the values between double curly braces are dynamic Meta macros.
monsite.com?esc-publisher=meta&esc-name={{campaign.id}}-meta&esc-location={{adset.id}}-meta&esc-creative={{ad.id}}&esc-creativetype=1x1&eseg-name=site-source&eseg-item={{site_source_name}}
These macros are not sent directly to the end user. They are replaced by Meta at the time of the click.
During campaign setup, the destination URL is entered in Meta with the Eulerian parameters.
The URL contains dynamic macros that allow media IDs to be automatically transmitted.
esc-name={{campaign.id}}-meta
esc-location={{adset.id}}-meta
At this stage, the values are not yet known. They will be replaced by Meta at the time of the click.
eseg-item={{site_source_name}}
When a user clicks on the ad, Meta replaces the macros with the actual values corresponding to the impression and the ad clicked.
monsite.com?esc-publisher=meta&esc-name=12004567890-meta&esc-location=12004567991-meta&esc-creative=12004568012&esc-creativetype=1x1&eseg-name=site-source&eseg-item=facebook
The user arrives at the site with a rich URL containing the Eulerian parameters.
These parameters allow the media context of the click to be transmitted.
They do not require any action from the user: they are simply present in the landing page URL.
When the page loads, the Eulerian tag collector reads the landing page URL.
It retrieves the parameters present in the URL, including:
The tag can thus identify that the source of the traffic is Meta, and then associate the transmitted IDs with the user journey.
This information is then used for performance analysis and attribution.
The IDs transmitted in the URL are technical identifiers.
They are very useful for ensuring stable tracking, but they are not always directly readable in a business report.
This is where the comes in.
The connector queries the Meta API to retrieve the labels associated with the received IDs.
The connector can also be used to synchronize additional media data, such as:
- the costs;
- impressions;
- certain campaign attributes;
- the labels associated with media objects.
It is strongly recommended to use technical IDs in dynamic macros rather than full names.
The main reason is stability.
An ID is a stable technical key. It does not change when the campaign manager modifies the name of the campaign, ad set, or advertisement.
Conversely, a name can be changed at any time.
Examples of common modifications:
- correction of a mistake;
- adding a date;
- change of casing;
- modification of a separator;
- adding a country or market;
- change in marketing wording.
Even if the name changes, the Meta object remains the same. It is still the same campaign, the same ad set, or the same advertisement.
If the URL sends the campaign name rather than the ID, Eulerian may receive several different values for the same media object.
The campaign is then renamed in Meta:
New clicks can then arrive with:
In Eulerian, these two values can be interpreted as two different campaigns:
esc-name=Summer Sale France
However, it is the same Meta campaign.
The name change can therefore create a fragmentation of reporting.
Clicks, conversions, costs, and impressions can be spread across multiple lines, complicating performance analysis.
With an ID-based macro, the URL sends a stable value.
Example :
After replacement by Meta:
esc-name={{campaign.id}}-meta
esc-name=12004567890-meta
Even if the campaign name is changed in Meta, the ID remains the same.
In Eulerian, the attachment key therefore remains stable:
This avoids the artificial creation of multiple campaigns in the reporting.
Using IDs in the URL does not mean that the final report has to be unreadable.
The best practice is to separate two concepts:
Stable key used for tracking and matching
Readable name displayed in the report
The ID is used to reliably identify the object.
The wording is used to make the reporting understandable for marketing teams.
The Partner Connector Meta allows us to link these two levels.
URL after macro replacement
monsite.com?esc-publisher=meta&esc-name={{campaign.id}}-meta&esc-location={{adset.id}}-meta&esc-creative={{ad.id}}&esc-creativetype=1x1&eseg-name=site-source&eseg-item={{site_source_name}}
monsite.com?esc-publisher=meta&esc-name=12004567890-meta&esc-location=12004567991-meta&esc-creative=12004568012&esc-creativetype=1x1&eseg-name=site-source&eseg-item=facebook
Using IDs in dynamic macros offers several advantages.
The IDs remain the same even if the names are changed in Meta.
This prevents the creation of duplicates in Eulerian reports.
Clicks, conversions, costs and impressions can be aggregated around reliable keywords.
The analysis is therefore more consistent over time.
The IDs received from clicks can be matched with data from the Meta API.
This facilitates the reconciliation between onsite data and media data.
The labels can be retrieved via the Meta connector.
Reporting can therefore remain readable for business users, while relying on robust technical keys.