Matching Logic - Alli Search Automation
Table of Contents
Explanation
Matching Logic refers to a process used at PMG, where information from a single row in an input Google Sheet is systematically applied to multiple related campaigns, ad groups, or accounts. This method is especially useful for managing large-scale advertising efforts, ensuring consistency, and streamlining the application of data across various entities.
This approach allows for efficient management of large-scale advertising efforts. Instead of manually updating each campaign or ad group, the matching logic automates the process, ensuring that each piece of data is correctly applied where needed.
In all Search Automation Google Sheets, you will see something similar to the following columns:

These columns use following matching logic to match to your accounts, campaigns, and ad-sets / ad-groups. Columns with ‘Inclusion’ or ‘Exclusion' in them are generally used for matching logic, and will determine which information is included or excluded.
How To - Basic
To match using words, the phrase/text of the naming structure that you use to indicate whether to pull must be separated from the other parts of the naming structure by some type of delimiter.
The following are delimiters recognized by Matching Logic:
Bar |
Underscore _
Hyphen -
Space
Carat ^
Tilde ~
The following are two examples of the words you can match to using Matching Logic, after it is broken out by a delimiter:
Campaign Name | Applicable Keywords |
---|---|
RT-USDPA_WomenAll_FB|No|US|FEFB|D_M|FB|DPAM|18|65|NoList|Noint | RT, USPDA, WomenALL, FB, No, US, FEFB, D, M, DPAM, 18, 65, NoList, Noint |
GAFA_Outlet_Coupons_Search_Branded_Exact_National | GAGA, Outlet, Coupons, Search, Branded, Exact, National |
Matching Logic also automatically checks for plurality. This means if you want to match to "Jean", the logic will automatically check for "Jeans" as well. This is true for the inverse, if you search for "Jeans", then Alli will also match to the word singular word "Jean".
How To - Advanced
Similar to SQL, Matching Logic uses ‘AND' and ‘OR' logic. Parenthesis can be used to group logic for more complexed combinations.
Logic | Symbol | Basic explanation | Campaign Inclusions Example | Explanation | |||
AND | & | "this and that" | RT&DPA | Will only match adsets that have both RT and DPA in the name | |||
OR | , | "this or this" | DPA,DPAM | Will match adsets that have either DPA or DPAM | |||
AND and OR | & , | "this and that or this" | RT&DPAM,RetargetingDPA | Will match adsets that have RT and DPA or only RetargetingDPA | |||
AND OR | &(,) | Ralph Lauren&(US,CA) | Will match to accounts that have ‘Ralph Lauren’ AND (US OR CA). The parentheses manipulate the order of operations. Otherwise it would only match to accounts with “Ralph Lauren US” OR accounts with “CA” |
For example, if I wanted to match to my Retargeting DPAs with the following campaign names:
Original Campaign Names | Available Words to Match to |
RT-USdpashirts_alldevices_DPAM | RT, USdpashirts, alldevices, DPAM |
RT-USdpashoes_mobile_DPAM | RT, USdpashoes, mobile, DPAM |
In order to match to these, I would want to use RT&DPAM because those are the only available words they have in common. I can NOT match to USdpa because is it not an exact match to USdpashirts and USdpashoes.
**If the word(s)/phrase you are looking for already contains a delimiter (like a dash or underscore) make sure to replace that delimiter with an "&". Example: If you wanted to match to all campaigns that contain 'RT-USjuly' (like RT-USjuly_shirts), you should use 'RT&USjuly', not the whole phrase'RT-USjuly'
If you wanted to match to all Accounts, Campaign, and/or Adsets for you client, simply pull the word 'All' in each of the inclusion columns.
You also must do this for every Inclusion column if you don't have specific inclusions for that column. (So if you have specific inclusions in the Campaign Inclusions, put "All" in both Adset and Account. Or if you have specifics in the Adset Inclusions, put "All" in Account and Campaign.)
More Examples
The following are some sample DPA campaigns:
PR-USDPA_DBA_W_060718_DPAM_MF
PR-USDPA_DBA_Promo_W_070118_MF_DPAM
PR-USDPA_DBA_Promo_M_070118_MF_DPAM
PR-USDPA_DBA_M_060718_DPAM_MF
If you wanted to match to all of the campaigns ANY of the following entries would work:
If you wanted to match to all DPA's but wanted to exclude Promos ANY of the following entries would work: