[UA] Extract dynamic parameters from URLs via filters [Legacy]

You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics.

If you do not want to, or are unable to, modify your tracking code or page code to define Custom Variables, you have the option to instead use a View filter to extract dynamic-parameter values for Product ID and then share those values as Dynamic Attributes.

Create a View filter

  1. In Analytics, click Admin.
  2. Select the relevant Account, Property, and View.
  3. In the View column, click Filters.
  4. Click + NEW FILTER.
  5. Select Custom filter, and then select Advanced.
  6. In Field A --> Extract A, select Request URI.
  7. In the text field for Field A..., enter a regular expression to identify your product IDs; for example:

    -(\d[^-]*)\.html

    or

    prod_id=([^&\.]*)
  8. In Output to --> Constructor, select User Defined.
  9. In the text field for Output to..., enter $A1.

Your completed filter should look something like the following:

 

 

The dynamic-parameter values that you extract from your URLs become visible in the User Defined report.

Share the dynamic-parameter values as Dynamic Attributes

When you share dynamic attributes with your AdWords accounts, under Required Attributes > Product ID, rather than select a Custom Variable, you can instead select User Defined to share the extracted values with AdWords, and use them as the basis for your Dynamic Remarketing.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
8610451004544357300
true
Search Help Center
true
true
true
true
true
69256
true
false