Analytics Experiments Dynamic URLs - google-analytics

I have a lot of product pages like this:
www.example.com/catalog001/item123
www.example.com/catalog002/item321
www.example.com/catalog002/item567
Every catalog and product(item) have its own numeric id.
Product pages are similar. Just different product image, price, title.
I tried to use Regular Expressions to set up original url pattern in Analytics Experiments:
www.example.com/catalog(\d+)?/item(\d+)?
Is there any way to set up original url pattern?

I'm not quite sure what you're asking. It sounds like you want to test many different product pages without setting up many different experiments, presumably to test two different product page layouts.
If so you can use relative urls in the experiments interface for that, there is no need for regular expressions. Create an experiment for one product page, select relative urls for the variations, enter a query string (?foo=bar) or fragment identifier (#foo=bar) that triggers the variation page, add experiment code to all the originals and the test will be enabled for all your product pages, not just the one url you entered in the interface.
If you were after something else I suggest you re-word the question to explain the actual problem rather than your attempt to solve it.

Related

Best way to count and filter Bing Custom Search results by site slice

I'm using the Search API to search in a Bing Custom Search instance. I defined one URL - also known as "slice" in the documentation - for my main site and additional URLs that are subparts of it, boosted up at various levels.
In my results page, I'd like to add filter functionality with filter criteria that match site slices.
Is it a legit approach to reference both a parent domain and subsites of it in the same search instance?
Is there a way to break up search results by slice with the API? I.e. for each result to be able to know which slice it originates from, and ideally to have aggregated numbers (e.g. result count) by slice?
Can I query on a specific slice or do I have to create a dedicated search instance with only that slice in it?
All domain related subsites can be in same instance. Pinned feature is used to filter search result for a specific query from a specific URL in the site. Please refer below link,
https://learn.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/tutorials/custom-search-web-page

Inherit URL path on Google Analytics Experiments

I want to run an A/B test using Google Analytics Content Experiments to test different pages.
I would like to know if there is a way to define variations inheriting parts of the URL path. I read the documentation but seems that Analytics only inherits URL dynamic parameters.
My URLs look like:
https://example.com/page1/{USER-DATA-123}
where {USER-DATA-123} contains some data related to current user and it's different for every visitor.
And I want to create this experiment:
Original page: https://example.com/page1/{USER-DATA-123}
Variation page 1: https://example.com/page2/{USER-DATA-123}
I was investigaing the same issue, just had to test two desings of this page https://labiteam.com/services/landing-page. There are two variants:
Turn your static urls with id sessions into dynamic. According to this manual https://support.google.com/analytics/answer/2664470?hl=en it should work
You can customize testing script manually, though I doubt it's a practical decision
Upd: Also, one more suggestion. Forget about A/B experiments, just make your URLs appear randomly (coding it manually) and set goals to each url.

How do I setup GA Content Experiment variations without URI attributes, but with segmented URI's?

I'm experimenting with GA's Content Experiments.
I want to track performance of differences on a product detail page for all products on a given website.
I use ExpressionEngine (written on CodeIgniter) to serve the pages. The URI's are in this format:
domain.com/product/{product_id}/{product_short_name}
The variations are:
domain.com/product-b/{product_id}/{product_short_name}
domain.com/product-c/{product_id}/{product_short_name}
where {product_id} and {product_short_name} are dynamic.
How do I setup the Experiment to test all products? Now, I can only to hard-code the entire URI (with product ID and short name), so the test is only ran for that one product.
To elaborate: GA seems to be forcing me to use URI's with parameters (domain.com/product?id={product_id}&short_name={product_short_name}) where it will recognise the attributes and add them to the variations URI's. This isn't possible when the parameters are in the form of segments.

Google Analytics - Don't view as unique pages

I have a url similar to this
/widgets/view/13031800
In the google analytics settings you can have it exclude url paramaters, but I can't figure out how to have it look at all
/widgets/view/ pages as one page. I don't need each one to be unique.
Any ideas?
Unfortunately there is not an easy answer to this. You can...
change what is passed in your _trackPageview calls on your page(s) to exclude the number
create a filter in the interface to strip off the number
Neither one of these solutions will retroactively apply (will not change data you already got).
Only way to see it for current data is to export your data to excel or whatever and do some manual work on it, like strip off the numbers and sum up the page views and remove duplicates sort of thing.

How to provide multiple search functionality in website?

I am developing a web application, in which I have the following type of search functionality;
Normal search: where user will enter the search keyword to search the records.
Popular: this is no a kind of search, it will display the popular records on the website, something as digg and other social bookmarking sites does.
Recent: In this I am displaying Recently added records in my website.
City Search: Here I am presenting city names to the user like "Delhi", "Mumbai" etc and when user click this link then all records from that particular city will be displayed.
Tag Search: Same as city search I have tag links, when user will click on a tag then all records marked with that tag will be displayed to the user.
Alphabet Search: Same as city and tag this functionality also has links of letters like "A", "B", .... etc and when user clicks on any letter link then all records starting with that particular letter will be displayed to the user
Now, my problem is I have to provide above listed searches to the user, but I am not able to decide that I'll go with one page (result.aspx) which will display all the searches records, and I'll figure using query string that which search is user is using and what data I have to display to the user. Such as, lets say I am searching for city, delhi and tag delhi-hotels then the urls for both will be as :
For City: www.example.com/result.aspx?search_type=city&city_name=delhi
For Tags: www.example.com/result.aspx?search_type=tag&tag_name=delhi-hotels
For Normal Search: www.example.com/result.aspx?search_type=normal&q=delhi+hotels+and+bar&filter=hotlsOnly
Now, I feels above Idea of using a single page for all searches is messy. So I thought of some more and cleaner Idea, which is using separate pages for all type of searches as
For City: www.example.com/city.aspx?name=delhi
For Tags: www.example.com/tag.aspx?name=delhi-hotels
For Normal Search: www.example.com/result.aspx?q=delhi+hotels+and+bar&filter=hotlsOnly
For Recent: www.example.com/recent.aspx
For Popular: www.example.com/popular.aspx
My new idea is cleaner and it tells specifically everything to the user that which page is for what, it also gives him idea that where he is now, what records he's seeing now. But the new idea has one problem, In case I have to change anything in my search result display then I have to make changes in all pages one by one, I thought that solution for this problem too, which is using user-control under repeater control, I'll pass all my values one by one to user-control for rendering HTML for each record.
Everything is fine with new Idea, But I am still no able to decide that with which I dea I have to go for, Can anyone tell me your thoughts on this problem.
I want to implement an idea which will be easy to maintain, SEO friendly (give good ranking to my website), user-friendly(easy to use and understand for the users)
Thanks.
One thing to mention on the SEO front:
As a lot of the "results" pages will be linking through to the same content, there are a couple of advantages to appearing* to have different URLs for these pages:
Some search engines get cross if you appear to have duplicate content on the site, or if there's the possiblity for almost infinite lists.
Analysing traffic flow.
So for point 1, as an example, you'll notice that SO has numberous ways of finding questions, including:
On the home page
Through /questions
Through /tags
Through /unanswered
Through /feeds
Through /search
If you take a look at the robots.txt for SO, you'll see that spiders are not allowed to visit (among other things):
Disallow: /tags
Disallow: /unanswered
Disallow: /search
Disallow: /feeds
Disallow: /questions/tagged
So the search engine should only find one route to the content rather than three or four.
Having them all go through the same page doesn't allow you to filter like this. Ideally you want the search engine to index the list of Cities and Tags, but you only need it to index the actual details once - say from the A to Z list.
For point 2, when analysing your site traffic, it will be a lot easier to see how people are using your site if the URLs are meaningful, and the results aren't hidden in the form header - many decent stats packages allow you to report on query string values, or if you have "nice" urls, this is even easier. Having this sort of information will also make selling advertising easier if that's what's you're interested in.
Finally, as I mentioned in the comments to other responses, users may well want to bookmark a particular search - having the query baked into the URL one way or another (query strings or rewritten url) is the simiplist way to allow this.
*I say "appearing" because as others have pointed out, URL rewriting would enable this without actually having different pages on the server.
There are a few issues that need to be addressed to properly answer your question:
You do not necessarily need to redirect to the Result page before being able to process the data. The page or control that contains the search interface on submitting could process the submitted search parameters (and type of search) and initiate a call to the database or intermediary webservice that supplies the search result. You could then use a single Results page to display the retrieved data.
If you must pass the submitted search parameters via querystring to the result page, then you would be much better off using a single Result page which parses these parameters and displays the result conditionally.
Most users do not rely on the url/querystring information in the browser's address bar to identify their current location in a website. You should have something more visually indicative (such as a Breadcrumbs control or header labels) to indicate current location. Also, as you mentioned, the maintainability issue is quite significant here.
I would definitely not recommend the second option (using separate result pages for each kind of search). If you are concerned about SEO, use URL rewriting to construct URL "slugs" to create more intuitive paths.
I would stick with the original result.aspx result page. My reasoning for this from a user point of view is that the actual URL itself communicates little information. You would be better off creating visual cues on the page that states stuff like "Search for X in Category Y with Tags Z".
As for coding and maintenance, since everything is so similar besides the category it would be wise to just keep it in one tight little package. Breaking it out as you proposed with your second idea just complicates something that doesn't need to be complicated.
Ditch the querystrings and use URL rewriting to handle your "sections".. much better SEO and clearer from a bookmark/user readability standpoint.
City: www.example.com/city/delhi/
Tag: www.example.com/tag/delhi-hotels/
Recent: www.example.com/recent/
Popular: www.example.com/popular/
Regular search can just go to www.example.com/search.aspx or something.

Resources