Concatenate Google Analytics results to ignore country code in URL - google-analytics

Our website automatically detects a user's region. Though the site structure remains the same across all regions, the content on the page can vary.
As such, URLs are fomatted as so: http://website.com/XX/pagename with XX=country code (e.g. GB, US, IT, etc.)
On Google Analytics, I want to see all of the different country versions of a single page contained as a single result.
For example, if I look at our top pages for January, I see:
| URL | page views |
|-------------------------|------------|
| website.com/US/page1 | 100 |
| website.com/GB/homepage | 60 |
| website.com/US/homepage | 40 |
| website.com/GB/page1 | 20 |
But what I want to see is:
| URL | page views |
|----------------------|------------|
| website.com/page1 | 120 |
| website.com/homepage | 100 |
Wherein the same URL (ignoring country code) is concatenated into one figure.
Is such a thing possible?
My end game here is a desire to see what our most popular pages are across the site in total, regardless of which country the user is browsing from.
Thanks!

One option is to use an advanced filter in GA so that you take something like website.com/US/page1 and replace it with website.com/page1. This only works on data moving forward from when the filter is applied, and does not change historical data, and cannot be undone once applied. This is another reason why it's always a good idea to have a Raw view which is unfiltered.
For the Advanced Filter, you need to do something like this:
where it looks for the pattern /{any two letters}/{anything else} and outputs just the /{anything else} part.

Related

Is it possible to use a SPI flash chip with a arduino (Atmega328p)

Is it possible to use an SPI flash chip with a minimum sector erase size of 4KB with an Atmega 328p (2KB of internal RAM)?
The problem I'm seeing: in order for data to be written to the flash, a page must be erased. If you want to update data inside a sector you first need to read all the pages inside the sector, save them off the chip, erase the sector and write the pages in order back with your changes.
But a sector of 4KB can't be saved inside a 2KB RAM, so what solutions do other people use for this situation? Because I have seen Arduinos be used in this setup but couldn't determine what their solution was.
(Arduino is just an example of a small microcontroller in this question)
You can simply use a dual-redundant page scheme. Given two 4kb pages organised thus:
Page A Page B
+------------+ +------------+
| Sequence A | | Sequence B |
!~Sequence A | !~Sequence B |
+------------+ +------------+
| | | |
| | | |
| Data A | | Data B |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+------------+ +------------+
Initially you write Data A and set Sequence A to zero its inverse ~Sequence A. On start-up you inspect each page's sequence number and set the page with the highest valid sequence number (valid when sequence ^ ~sequnece == 0xff) as the current read page, and the other as the current write page.
When you update the data, you erase the current write page, write the data area, then set the sequence number to the sequence number of the read page plus 1 (modulo 256), and set its inverse. Then swap the current read/write pages. When updating you can copy the data from one page to the other without buffering the entire page, and modify just the part you intend to change.
If there is a power failure or reset during a write, the page sequence number will not be valid as it is written last and both the sequence and inverse sequence write must complete, so the partially written data will be invalidated and the previous valid page will be selected on start-up.
When selecting the current active page, you of course have to deal with the wrap-around (i.e. when the sequence numbers are 255 and zero, zero is the newer).
This scheme is suitable for data that will be read often and written seldom. The nature and frequency of your NV read/write cycles will dictate a suitable mechanism since different solutions would be appropriate for sequential logging or non-volatile event counters.
It's a bit unclear, what content (size) you expect to write and how often.
You could think of several smaller NV blocks, which are way less then the page size. Each NV block has some block header identifying the block (e.g. BlockID + Size). Then you could update the page as long as a new NV block fits into that page. If not, write this to the next page, and copy all the latest other blocks over to the new page too. Then you can erase and prepare the old page for the next swap meanwhile.

GOOGLE DATA STUDIO - Get the conversion percentage in a funnel

I am using Google analytics data source and my goal is to make a conversion funnel showing the percentage of users that has reached each page, using as the denominator the users of the initial page of the process.
Example:
PAGE | Users | Conversion |
page1 | 1.000 | 100% |
page2 | 800 | 80% |
page3 | 700 | 70% |
page4 | 20 | 20% |
I can get it by working the data before in a Google spreadsheet but I need to do it directly from google analytics to use the date filter.
Is it possible to achieve my objective?
Please help!
Currently not possible in GDS with the direct GA connector. Hopefully something they will update soon!

Optimize complex scenario in Cucumber

I have been working on an automation project where I have to write cucumber test for search filter. Search filter works dynamically where parameters are nested - next parameter are populated based on previous parameter e.g. On selecting "Subscribers" next parameters in dropdown are "Name", "City", "Network". Likewise, on selecting "Service Desk", parameters in subsequent dropdown are "Status", "Ticket no.", "Assignee". I am using Scenario Outline as below:
Scenario Outline: As a user, I can search records
Given I am on search page
When I search on "<category>" and "<nestedfilter>"
Then I see records having "<category>" category
Examples:
|category |nestedfilter|
|Subscribers |Name |
|Subscribers |City |
|Subscribers |Network |
|Service Desk|Status |
|Service Desk|Ticket no. |
|Service Desk|Assignee |
The filter could be more complex as there could be more nested filters based on previous nested filters.
All I need to know if there could be a more efficient way to handle this problem? For example passing data table to step_definition for which I am not too sure.
Thanks
If you really need the order of your items to be preserved, use a data table instead of a scenario outline.
A scenario outline is a shorthand notation for multiple scenarios. The execution of each scenario is not guaranteed. Or at least it would be a mistake to assume a specific execution order. The order of the items in a data table will not change if you use a List as argument and therefore a lot safer in your case.
A common mistake with Cucumber is to use Scenario Outline and example tables to do some sort of semi-exhaustive testing. This tends to hide lots of interesting things about the functionality being developed.
I would start writing single features for the searches you are working with and explore what those searches are and why they are important. So if we start with your first one we get ...
Note: all of the following assumes a background step Given I am searching
When I search on subscribers and name
Then I should see records for subscribers
and with the second one
When I search on subscribers and city
Then I should see records for subscribers
Now it becomes clear that there is a serious flaw in these scenarios, as both scenarios are looking for the same result.
So what you are actually testing is that
The subscribers search has name and city filters
A subscriber search should return subscriber results
Now you can refactor and get
When I do a subscriber search
Then I should see city, name, network filters
When I do a subscriber search
Then I should only see subscriber results
note: This is already much more efficient as you have reduced the number of scenarios from 3 to 2, and reduced the number of searches you have to do from 3 to 1.
Now I have no idea if this is what you want to do, but this is what your current scenario is doing. However because you are using an Outline and Example tables you can't see this.
The fact that you have a drop-down and nested filters is an implementation detail, which describes how the user is trying to achieve what they want to achieve.
If you think of what you're trying to do as examples of how the system behaves, rather than tests, it might be easier. You're not looking for something exhaustive. You also want your scenarios to be specific, so that you're illustrating them with realistic data and concrete examples. If you would commonly have some typical data available, that's a perfect thing to set up using Background.
So for instance, I might have scenarios like:
Background:
Given I have subscribers
| Name | City | Network | Status | etc.
| Bob | Rome | ABC | Alive | ...
| Sam | Berlin | ABC | Dead | ...
| Sue | Berlin | DEF | Dead | ...
| Ann | Berlin | DEF | Alive | ...
| Jon | London | DEF | Dead | ...
Scenario: First level search
Given I'm on the search page
When I search for Subscribers who are in Rome
Then I should see Bob
But not Sue or Jon.
Scenario: Second level search
Given I'm on the search page
When I search for Subscribers in Berlin on the ABC network
Then I should see Sam
But not Sue or Ann
etc.
The full-system scenarios should be just enough to understand what's going on. Don't use BDD for regression. It can help with that, but scenarios will rapidly become slow and unmaintainable if you try to cover every case. Delegate to integration and unit tests where appropriate (see "the testing pyramid").

Rackspace FIles Folder 'Alias/Redirect'

I am trying to come up with a 'versioned' data system. The different groups of data I have will be updated at different intervals and are quite large (MAP TIFFS) so I'd like to avoid duplicating content as much as possible, we're talking around the 50gb mark. Say for example I have the two following categories of Maps: Country Maps & City Maps. Country Maps get updated quarterly and City maps get updated bi-annually. Over a period of 6 Months The folder structure I end up with is this:
RACKSPACE CONTAINER
|
|-JAN2014
| |
| |-Cities
| |-Countries
|
|-APR2014
| |
| |-[Cities] (Not a real folder, an alias/redirect to the Jan 2014 version)
| |-Countries
|
|-JUL2014
| |
| |-Cities
| |-Countries
|
|
My App is given the current data version for that time period (i.e JAN2014, APR2014 or JUL2014) and will use it to form the url to fetch the map file i.e blah.rackcdn.com/JAN2014/Cities/Map.file) I would like to be able to point an alias/redirect of blah.rackcdn.com/APR2014/Cities/Map.file (which doesn't exists because the older cities map data is still valid) to the old folder, Hopefully that makes sense, is there any way to accomplish this? Currently I'm using Cyberduck ftp to upload my files / directory structure to rackspace.
If I am unable to achieve this with Rackspace, is this able to be done with any other file hosting services (i.e. Google Cloud storage)?
Cheers
It is possible to simulate symlinks on Rackspace Cloud Files. See this blog post on how to do this using the Cloud Files REST API: http://developer.rackspace.com/blog/simulate-symLinks-on-cloud-files.html.

How to create a table like structure in drupal content type?

I am almost there with this but cannot seem to get this functionality going as planned.
I am creating a questionnaire using drupal content type. What I am trying to do is to create a table like structure as below in content type. The second and third column contain check boxes and first column data(i.e computer, internet) and first row(i.e Everyone have access , Nobody have access) are taxonomy terms . Is it possible to display like this in content type by using some modules in drupal? Anybody have any better suggestions?
| | Everyone have access | Nobody have access |
---------------------------------------------------------
| Computers | 1 | 2 |
---------------------------------------------------------
| Internet | 1 | 2 |
---------------------------------------------------------
| Fax | 1 | 2 |
---------------------------------------------------------
You can use the Term Level Field module. This module provides a field type for referencing terms with a level to an entity.
You may use Editable fields with Views module. Of course, if you didn't need such a display (table forms) you should use Views Bulk Operations modules.
If you need to do this in a node use Tableform module. But if you want to show nodes whike editing a node it is the same. A node should not be used for tasks just for content.

Resources