Campaign viewed
Learn how to check if a user has viewed campaigns.
This expression checks whether the user has viewed a campaign based on marketing campaign parameters present in page views.
Syntax
The basic syntax for this expression is:
user has viewed campaign
You can optionally include the article for better readability:
user has viewed a campaign
The negation of the expression can be expressed as:
user has not viewed campaign
You can refine the expression with criterias, quantifiers, and time windows:
user has viewed campaign /*<criteria>*/ /*<quantifier>*/ /*<window>*/
Parameters
- criteria(optional)
Additional filtering criteria for the campaign viewed event.
- quantifier(optional)
A quantifier to specify how many times the campaign must have been viewed.
- window(optional)
The time window during which the campaign must have been viewed.
Event properties
The following event properties can be used within criteria expressions:
- name(optional)
A unique identifier for the campaign. It is usually a short string, such as "summer-sale" or "new-product-launch".
- source(optional)
The advertiser, site, or publication generating the traffic. For example, "google", "facebook", or "newsletter".
- medium(optional)
The advertising or marketing channel used to reach the user. For example, "email", "video", or "social".
- content(optional)
An identification of the specific ad or content the user interacted with. For example, "main-banner" or "newsletter-cta".
- term(optional)
The keyword or term that triggered the ad. For example, "running shoes" or "tennis racket".
Examples
You can check if any campaign was viewed:
user has viewed campaign
Or verify it no campaign was viewed:
user has not viewed campaign
You can also check if the user viewed a specific campaign:
user has viewed campaign with name "Optimize"
Or if the user viewed a campaign at least 2 times:
user has viewed campaign with name "Optimize" at least 2 times
You can even filter by time, such as checking if it was viewed yesterday:
user has viewed campaign with name "Optimize" yesterday
Combine filters, counts, and time windows in one expression:
user has viewed campaign with name "Optimize" exactly 2 times today