Comments on: Expert Google Analytics Guide to Ecommerce Content Analytics https://online-metrics.com/content-analytics/ Google Analytics Courses and Consulting Tue, 22 Aug 2023 07:02:35 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Paul Koks https://online-metrics.com/content-analytics/#comment-29807 Mon, 22 Jan 2018 12:13:59 +0000 https://online-metrics.com/?p=12397#comment-29807 In reply to David Alvarez.

Hi David,
Sure and I am glad it’s helpful!
Best,
Paul

]]>
By: David Alvarez https://online-metrics.com/content-analytics/#comment-29801 Sun, 21 Jan 2018 19:16:35 +0000 https://online-metrics.com/?p=12397#comment-29801 In reply to Paul Koks.

Hi Paul,
Many thanks for your response. It’s very useful. Much appreciate.
Everything is far more clear now and I am more than sure that I will use that in the future.
Also thanks for the testing tools.
Regards,
David

]]>
By: Paul Koks https://online-metrics.com/content-analytics/#comment-29719 Sun, 14 Jan 2018 14:05:10 +0000 https://online-metrics.com/?p=12397#comment-29719 In reply to David Alvarez.

Hi David,
Great to hear from you and I am glad this post is useful!

This is a tricky RegEx and I had been playing around for a while – used some others first.

The ^ and ? match is used to remove a part of the URL that contains ?, but please note that ^? won’t work without using brackets, which means “not”. Otherwise it’s an invalid RegEx.

Let’s deconstruct it:
^([^?]+)

– First anchor ^ Matches the beginning of the string. If you don’t use it, it will also match the query parameter (not including ? itself).
– () Groups multiple tokens together and creates a capture group for extracting a substring or using a backreference.
– [^?]+ Creates a negated set that includes ? -> to remove ? and everything behind from the URL. Without the +, it would match only an opening / (slash) I think.

I have validated this RegEx in several accounts, all positive.

Sometimes a RegEx can get really complicated, hope this helps a bit!

These tools can be really powerful when you are testing:
https://regex101.com/
https://regexr.com/

Best,
Paul

]]>
By: David Alvarez https://online-metrics.com/content-analytics/#comment-29715 Sun, 14 Jan 2018 01:58:00 +0000 https://online-metrics.com/?p=12397#comment-29715 Hi Paul,
Many thanks for the post it’s very useful.
I’d like to ask you about a Regex you use on it because I’ve never seen before that combination and I don’t know exactly what does it means. It would be great if you could shed some light on it. The part of the Regex I don’t understand is:
[^?]+
Concretely the match of ^ and ?
Could you say what exactly means? I’ve seen before for e.g. [^ab] using it to exclude a and b, but don’t see the meaning as you have used it.
Thank you so much

]]>