Skip to content

Marketing

parse_ad_group_name (UDF)

Please provide a description for the routine

Parse Ad Group Name UDF

This function takes a ad group name and parses out known segments. These segments are things like country, language, or audience; multiple ad groups can share segments.

Currently supported formats are gads_v2 (9 segments, parsed into ad_network, version, product, initiative, region, country_code, placement, audience, targeting) and meta_v2 (5 segments, parsed into ad_network, version, audience, placement, targeting).

We use versioned ad group names to define segments, where the ad network (e.g. gads) and the version (e.g. v1, v2) correspond to certain available segments in the ad group name. We track the versions in this spreadsheet.

For a history of this naming scheme, see the original proposal.

See also: marketing.parse_campaign_name, which does the same, but for campaign names.

Parameters

INPUTS

ad_group_name STRING

OUTPUTS

ARRAY<STRUCT<key STRING, value STRING>>

Source | Edit

parse_campaign_name (UDF)

Parse a campaign name. Extracts things like region, country_code, and language.

Parse Campaign Name UDF

This function takes a campaign name and parses out known segments. These segments are things like country, language, or audience; multiple campaigns can share segments.

Note: the public copy of this UDF is currently a stub that always returns NULL; the active parsing logic lives in Mozilla's private bigquery-etl repo.

We use versioned campaign names to define segments, where the ad network (e.g. gads) and the version (e.g. v1, v2) correspond to certain available segments in the campaign name. We track the versions in this spreadsheet.

For a history of this naming scheme, see the original proposal.

Parameters

INPUTS

campaign_name STRING

OUTPUTS

ARRAY<STRUCT<key STRING, value STRING>>

Source | Edit

parse_creative_name (UDF)

Parse segments from a creative name.

Parse Creative Name UDF

This function takes a creative name and parses out known segments. These segments are things like country, language, or audience; multiple creatives can share segments.

Currently supported formats are gads_v2 and meta_v2, each parsed as 7 underscore-separated segments into ad_network, version, creative, format, dimension, length, cta.

We use versioned creative names to define segments, where the ad network (e.g. gads) and the version (e.g. v1, v2) correspond to certain available segments in the creative name. We track the versions in this spreadsheet.

For a history of this naming scheme, see the original proposal.

See also: marketing.parse_campaign_name, which does the same, but for campaign names.

Parameters

INPUTS

creative_name STRING

OUTPUTS

ARRAY<STRUCT<key STRING, value STRING>>

Source | Edit