I need some solution to make url as on image shown. I think regular expressions don't work in that field, however it announced that regex works in google analytics.
Regards, Dmitry.
Regex in Google Analytics is intended to be used in features that affect a broad range of pages or fields, like filters, advanced segments, etc.
The web page field from your screenshot is looking for a static URL. The content experiments are designed to run variations on a single page.
Related
Using Bing Web Search API, I need to filter results only for my domain, example query:
https://api.cognitive.microsoft.com/bing/v7.0/search?q=site:mysite.com+myquery
But in results I received not only mysite.com results but also from sites like wikipedia and others.
How I can search result only for my domain?
Bing Custom Search not work for me because I have more than 10k transactions
Your website is probably not known or indexed by Bing. Since you use Bing Search API, not a custom indexing service or search across a sitemap.
The actual Bing website will need to be able to find your site.
Since it doesn't, this triggers the default behavior of returning as relevant as possible results.
This behavior is valid for urls such as the following:
https://api.cognitive.microsoft.com/bing/v7.0/search?q=microsoft+site:notAnIndexedWebsite.com
Formatting wise, there is multiple options, as seen here.
None of it is a problem in this case.
You can try Bing custom search if it helps (at https://www.customsearch.ai/), especially as it is now in GA. It also provides option to crawl your pages in Bing index through webmaster, if they are not crawled already. This should make sure that you get results only from your website.
General setting
I have a website, which uses regular and encrypted urls. Now I want to track the pageviews or all pages the same way.
I have regular URLs like this:
/library.dll?page=page12&arg1=0&arg2=some&session_id=7892734
and special pages like this:
/library.dll?page=specialpage&arg1=0&arg2=some&session_id=7892734&id=page13
aswell as encrypted URLs like this, which are also containing the session id:
/library.dll?page=encrypted&args=gYZEI7lnRAQLzVXdtdbcral8.cOoc6NDtMUGY2yep9wO3JM
So the interesting niformation is always the page, which is in this examples page12, page13 and page14 (where page14 is also part of the encrypted string).
Clarification
I can change the HTML and JS code only. I have no access to the Google Analytics interfaces at all. This will be administrated by multiple customers.
The GA code will be integrated within a template using a customer-specific code and their unique tracking id.
Problem description
I need to track the page argument, because this is basically the interesting part of the url. When tracking other url parameters I cannot accumulate the pageviews for a certain page, because Google Analytics shows them as separate pages.
In addition I don't see any way to track the pageviews with encrypted URLs, because I cannot set a generic name for them unless there is a way to utilize the method ga('send', 'pageview');
Solution idea
I read about overwriting the pageview attributes like this:
ga('send', 'pageview', '/my-overridden-page?id=1');
in the article on page tracking #Google Developers
Utilizing (event) triggers is in my opinion a pretty bad idea.
The question itself
Is there any smarter way to track this information? Is extracting the page-information and overwriting the pageview attributes the best way to do this?
I just started using GA and have kind of no idea how to do this any other way.
You could use filters (custom advanced filters) to rewrite the request url inside the google admin interface (admin->views->filters). This has the advantage that you do not need to change your site/application code.
However using filters will require multi-step-filters with heavy use of regular expressions, and you would have to test this in a "staging" view first (because a wrong filter will permanently mess up your data).
Passing a custom url to the pageview tracking is pretty straightforward and can be tested immediately via the real time view. In my opinion this is indeed the smartest way to do this.
How would I go about preventing the tracking of hash path changes within google analytics while using the jquery address plugin?
original URL:
/?watch
When moving sliders on the page, address bar is appended:
/?watch#/204;276
Within analytics I'm seeing it tracked as unique page views like so:
/?watch/204;276
I'm just wanting it to be tracked as:
/?watch
Help much appreciated.
You could use a custom search and replace filter with a regular expression in the search string.
Before setting up any filters, make a "master" profile in GA that contains unfiltered data. That way if your filter affects your data negatively, you have all your data unfiltered and backed up.
The regular expression I used is ^/\?watch[/0-9;]+ You can test it at RegExPlanet. I didn't put the hash (#) symbol in the regex because, according to your question, GA is not tracking it in the request URI.
Been using internal site search with Google Analytics and while I love the ability to see what my users are searching for, I am having a really hard time figuring out what search terms lead to which pages.
When I search on both the nextPagePath and searchKeyword dimensions while filtering on the search results page at the current path, the nextPagePath is always the search results page even when I know it shouldn't be (when tracking my own obscure searches). The same goes for using the searchDestinationPage dimension. I can't get any data that shows a jump from a search results page to another page on the site.
Here's a cleaned up example of my api query.
dimensions=ga:searchKeyword,ga:nextPagePath&metrics=ga:pageviews&filters=ga:previousPagePath=#dosearch
When I use the standard Analytics UI and look at the Destination Pages list under Content->Site Search->Destination pages, I only have 25 or so, all of which are just the variations on the base search-result page URL.
Do I need additional tracking code on my search results pages? Custom variables? A different query through the API?
I can see the tracking requests going out from both the search results and the pages selected from the results.
I found a couple of questions in the Analytics forums that ask this same question, but none of them had anything resembling a working solution.
I would bet you are not using the proper dimensions in the API
See https://developers.google.com/analytics/devguides/reporting/core/dimsmets/internalsearch
ga:searchDestinationPage is probably what you wanted when using ga:nextPagePath
I'm doing custom-rolled view tracking on my website, and I just realize that I totally forgot about search bots hitting the pages. How do I filter out that traffic from my view tracking?
Look at the user-agents. It might seem logical to blacklist, that is filter out all the strings that contain "Googlebot" or other known search engine bots, but there are so many of them, it could well be easiest to just to whitelist: log visitors using a known browser.
Another approach would be to use some JavaScript to do the actual logging (like Google Analytics does). Bots won't load the JS and so won't count toward your statistics. You can also do a lot more detailed logging this way because you can see exactly (down to the pixel - if you want) which links were clicked.
You can check the user agent: here there is a nice list.
Or you could cross-check with the hits on robots.txt, since all the spiders should read that first and users usually don't.