I am trying to create a report in google analytics which should include this /customer/account/create?signup=1&invitation_url as a part of the landing page. When I create the custom report for filters when I add
/customer/account/create?signup=1&invitation_url and use regex I am getting null values. What regex expression can I use to get this?
Basically I need all sessions from the landing page that includes
/customer/account/create?signup=1&invitation_url
You need to screen special symbols with "\".
\/customer\/account\/create\?signup=1&invitation_url
Good tool to test regex:
https://regex101.com/
Related
My Google Analytics record pages with dynamic parameters. URL looks like:
/iframe/dashboard/214301/customercare/cc
/iframe/dashboard/842904/customercare/serviska-fb
/module/customercare/serviska-fb/842904
The problem is that site content report cannot merge these URLs as an access to the same page /customercare.
How can I solve it?
I know that I can add a custom filter in the account settings, but how to setup regular expression?
Search and Replace Filters supports regular expressions so you might have a filter like:
Search string: /customercare(\/.*)
Replace string: /customercare
where (\/.*) is a part of a regular expression matching all the characters following /customercare
I'm looking to find a way to replace the home page URL that Google deems as "/" in my Google Analytics reports. I know Google sets "/" as the home page but in my reports, I want it to display "Home" instead.
I haven't found any solutions through Google. I'm thinking it's through filters somehow.
I've tried going through the GA settings and did a search on filters how to change this but no solutions. Thanks!
Although I would not recommend this, you can create a filter in a view (possibly not the default one as it's bad practice) with the following fields:
Regex explaination:
^ asserts position at start of a line
\/ matches the character / literally
$ asserts position at the end of a line
Filter configuration if the SS gets lost:
Filter type: Custom
Checbox: Search and Replace
Filter field: Request URI
Search string: ^(\/)$
Replace string: Home
Remember to verify your filter and to create an additional view if you do this.
I'm trying to migrate my ASPX site to Kentico, and as part of my task I'm migrating URLs. I need to preserve my URL structure, so I need to keep URLs which look like : "foo.com/bar.aspx?pageid=1".
I checked page's "URLs" property tried to use wildcards, some patterns like /bar/{pageid}- /bar/{?pageid?}-, etc but Kentico always replaces question marks.
Is there a way to achieve that via the admin interface?
You don't need to do anything in order to use "foo.com/bar.aspx?pageid=1" url.
Create a page under the root and call it bar, so you'll get a page # foo.com/bar.aspx. Kentico and/or .net does not care what you add to a url after question mark, so foo.com/bar.aspx?pageid=1 will work as well as foo.com/bar.aspx?someparam=sdf, or foo.com/bar.aspx?id=1&p=3&t=3.
You may (or may not) implement some functionality based on query string (e.g. paging), so it will parse query string and act in appropriate way.
By default Kentico UI does not handle adding URL aliases with URL parameters like you show. There is an article on the DevNet for a URL Redirection module which has code you can import into your site to allow you to perform these redirects within the Kentico UI. I'd suggest using this approach.
Unfortunately, I can't share a code sample since it's an article but it also has a link to download the code too. This appears to only be coded for Kentico 8.2 right now but I'm guessing you could do some work to make it work for other versions if you needed.
I think there are few concepts that you are clubbing here. I will start with your line code here
/bar/{pageid} - {pageid} is a positional parameter in Kentico's language if you choose to use dynamic URLS based on patterns. SO if you have a code that relies on pageid parameter to fetch some data then Kentico will pass that value. E.g in case of /bar/420, it will pass pageid as 420 different web parts on your template
/bar/{?pageid?} - This will search for query string parameter "pageid" on the request URL and replace its value here. So if you passed foo.com/bar.aspx?pageid=366, the resulting URL will be /bar/366
The #1 is positional parameter and #2 is the way in which Kentico resolves query string macros.
I hope this clarifies.
When trying to save a filter to a GA dashboard widget I am getting the error message 'Unexpected error. please try again later'.
The widget I am having a problem with is the 'show landing pages for Facebook referrals' widget.
Here are the parameters I set...
Display the following columns:
Page title
Unique pageviews
Filter this data:
Only show 'Social source referral' Exactly matching Yes
Only show 'Social network' Exactly matching Facebook
Up to this point I can save the widget.
Now...its the following filter that is causing the problem.
Only show 'Page' Regular expression
twwdcqgfk1|u0evfggft91b|u0qpgfgfgy64z|u2lfgfgfhrnsg1|u4d5aerwwrhoz|u6mwwwrr39tiz|u8tr5hfs2st5z
The above is only a sample of the ids, I use about 450 ids in the regular expression field.
When I use this filter on other widgets in the same dashboard and in widgets of other dashboards it works fine but on a few I get the error when trying to save 'Unexpected error. please try again later'.
If I just use two ids in the regular expression field i.e. u4d5aerwwrhoz|u6mwwwrr39tiz I can save the widget with the 'page' filter - however if I add more than two ids that's I cannot save.
I can't figure it out, i've tried saving this filter using multiple browsers, on different pc's, at different times but I cant get it to work.
Any ideas?
Thanks
the reason why the report won't work is quite simple :-)
Regular Expressions — You can also use regular expressions in filter
expressions using the =~ and !~ operators. Their syntax is similar to
Perl regular expressions and have these additional rules: Maximum
length of 128 characters — Regular expressions longer than 128
characters result in a 400 Bad Request status code returned from the
server.
The workaround from my experience is to use API and run several queries so that you can stay within the limits. But it's pain in the ass...
If there is some simpler pattern -- I checked and all of the posted IDs have 13 characters, so maybe you could use regular expression checking the number of characters. Something like:
.*\?^facebookAdId=.{13}$/
The curly brackets are the way to check the number of occurrences. This could probably help.
On my site I am tracking the URL /shop/ as goal by head match. As there are some URL parameters I cannot use exact match here.
Additionally, I am tracking a goal by exact match which is a URL to subfolder: /shop/process/paid.php
The problem is that GA tracks this subfolder with the head match as well, and thus saves the URL parameters that come along with paid.php, e.g. paid.php?email=customer#home.com
How can I prevent GA to track the URL parameters?
How would the setup look like?
Thanks!
That should work with a custom filter:
admin->profile->filters->custom filter->search and replace.
Search for
/shop/process/paid.php\?.*
(that's your url with arbitrary query parameters, the "\" is an escape sign since "?" is also an control character in regular expression. Dot means any character and "*" means any number of the preceding (in that case any) character) and replace with the desired url ( /shop/process/paid.php).
There is probably a more elegant solution but like most people I'm not good at this regex stuff. This should work however.
Alternatives:
If those query parameters are nowhere needed in the tracking data you can exlude them completely in the profile settings.
You can created a profile for the subdirectory based on the directory (include filter->request uri contains "/shop" and set only this profile to remove query parameters