AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.9K members online now
1.9K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

View Filters for Internal Campaign URL Parameters

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to use Custom Dimensions and URL parameters in order to track clicks on promotional banners that we use throughout our site. I have set up three custom dimensions to hold the campaign parameters and then I'm using view filters to pull the campaign parameters into the custom dimensions and finally wipe them from the URL. In my testing, I'm seeing my test URLs come through (in the raw view) but the filters are not storing the campaign parameters into the custom dims (in the filtered view).

 

Details are below. I've tested my regexs in the GA interface to filter reports, so I know that they work. Any ideas are greatly appreciated!

 

Custom Dimensions (all with Scope = Session):

  • Internal Campaign Name (ic_name)
  • Internal Campaign Medium (ic_medium)
  • Internal Campaign Content (ic_content)

Example of Link used for Testing:

https://www.mysite.net/page.html?ic_name=test-bf-camp&ic_medium=test-home-banner&ic_content=test-con...

 

View Filters

Filter #1 (Advanced) - Extract Internal Campaign Name

  • Field A -> Extract A
    • Request URI
      • ic_name=([^&]*)
  • Output To -> Constructor
    • Internal Campaign Name
      • $A1
  • Field A Required
  • Override Output Field
Filter #2 (Advanced) - Extract Internal Campaign Medium
  • Field A -> Extract A
    • Request URI
      • ic_medium=([^&]*)
  • Output To -> Constructor
    • Internal Campaign Medium
      • $A1
  • Field A Required
  • Override Output Field

Filter #3 (Advanced) - Extract Internal Campaign Content

  • Field A -> Extract A
    • Request URI
      • ic_content=([^&]*)
  • Output To -> Constructor
    • Internal Campaign Content
      • $A1
  • Field A Required
  • Override Output Field

Filter #4 (Advanced) - Remove Internal Campaign Parameters

  • Field A -> Extract A
    • Request URI
    • (.*)\?ic_.*
  • Output To -> Constructor
    • Request URI
      • $A1
  • Field A Required
  • Override Output Field

 

1 Expert replyverified_user

Re: View Filters for Internal Campaign URL Parameters

Top Contributor
# 2
Top Contributor

I might be wrong but i dont think filtering can be used in this way with custom dimensions.. custom dimensions usually need to be attached to a hit of some kind .. eg a pageview, event or similar.. then they can be filtered before they get to the reports

 Unlike other types of data, custom dimensions and metrics are sent to Analytics as parameters attached to other hits, like pageviews, events, or ecommerce transactions. As such, custom dimension or metric values need to be set before a tracking call is made in order for that value to be sent to Analytics.

https://support.google.com/analytics/answer/2709828#collection

They could be sent via an onclick event on the banner with a hit level scope.. 


Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View Filters for Internal Campaign URL Parameters

Participant ✭ ☆ ☆
# 3
Participant ✭ ☆ ☆

It's good question.

I've just tried the similar setup and it fails. I've tried to write $A1 to custom dimension, medium and page title and all three failed. I've seen page title and medium were correctly picked up in real time report but then disappeared in standard reports.

I'm going to review it back in few hours to check if it's not a data processing issue. But anyway I suggest that stripping these values with GTM and Custom Variables would be faster and more reliable since these values could then be available in any view

View Filters for Internal Campaign URL Parameters

[ Edited ]
Participant ✭ ☆ ☆
# 4
Participant ✭ ☆ ☆

I've checked again and now I can see valid values in custom dimension. So it seems to be a data processing lag issue

View Filters for Internal Campaign URL Parameters

Participant ✭ ☆ ☆
# 5
Participant ✭ ☆ ☆

Nick's approach seems to be working. At least I've populated some custom dimension values in that way. But anyway it's somehow weird behavior since custom dimensions are defined on the Property level but appears to be sent with a View filter. I'd love to know if that values could be accessed in the non filtered view after being generated that way

View Filters for Internal Campaign URL Parameters

[ Edited ]
Top Contributor
# 6
Top Contributor

I dont see how they could be access in a non filtered view.. the custom dimensions aren't being sent to ga .. a filter is being used to put a data string into a field.
another example would be.. a visitor arrives at the site via source/medium - google/organic.
You can use filters to change how the source medium appears in the reports.. but it doesnt actually change how the source/medium is tracked, it just changes its reported appearance within that view.
If event tracking is setup on the banner for when ppl click it then the custom dimensions could be sent with the events at hit level scope

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View Filters for Internal Campaign URL Parameters

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Hello Bronwyn and Дмитро Б,

 

Thanks for the replies! I still can't figure out what's wrong though. I'm curious to hear that Дмитро Б got values to populate in the custom dimensions. Did you use my exact setup? Were the custom dimensions set to session scope? I haven't seen any values in the custom dimensions.

 

Also I wanted to note that when selecting the custom dimensions in the advanced filter, it displays the custom dims in green italics with '!' after them, whereas all other dimensions are in normal black text. I wonder if this is GA telling you that you can't use these in advanced filters? But why would they let you select them anyways? Did you see that too Дмитро Б?

 

To address the comments about Events and GTM, we do not have GTM currently and I'm trying to empower our marketers to create these smart links without coding involvement, hence the hope to achieve it in the URL. Thanks for your help!

Re: View Filters for Internal Campaign URL Parameters

Participant ✭ ☆ ☆
# 8
Participant ✭ ☆ ☆

my custom dimension was Session scoped and it was displayed in green. But anyway it worked

p4.pngp3.pngp1.pngp2.png