/extract-parameters

Extract Parameters From Event Data (Custom Variable Template for Server-Side Google Tag Manager)

Primary LanguageSmartyApache License 2.0Apache-2.0

Extract Parameters

Custom Variable Template for Server-Side Google Tag Manager

Extract a parameter (e.g. fbclid or gclid) value from URLs event data like page_location or a request parameter

Template Status Repo Size License


Note: This template does not need any permissions.

Usage

  • Create a variable to extract a request parameter (like dl from a raw Universal Analytics request) or event data field (like page_location) where the desired parameter value can be found.

  • Create a new variable with this template.

  • Choose the variable from the first step as input. Then define the name of the desired parameter.

  • The variable will find and return the parameter value. If the parameter is not present, you can pick either an empty string or undefined as return value.