Google Analytics - Find most popular site directories - google-analytics

I want to be able to track the most popular directories on my site. The site is split as follows:
www.sitename.com/directoryA
www.sitename.com/directoryB
www.sitename.com/directoryC
Each directory has thousands of pages recording views underneath it e.g.
www.sitename.com/directoryA/page1
www.sitename.com/directoryA/page2
www.sitename.com/directoryA/page3
What I would like to is roll up the views from all the pages to create a table of my my popular directories (there are thousands on the site)
How can I do this?

Create a new field in DataStudio with this regex:
REGEXP_EXTRACT(Page,'(/[^/]+)')
This way, you can use this new field to group your counters based on part of the URL.
If you need to analyze other levels, just adjust the regex, repeating /[^/]+:
1st level (/path1): REGEXP_EXTRACT(Page,'(/[^/]+)')
2nd level (/path1/path2): REGEXP_EXTRACT(Page,'(/[^/]+/[^/]+)')
3rd level (/path1/path2/path3): REGEXP_EXTRACT(Page,'(/[^/]+/[^/]+/[^/]+)')
...

Related

How to get multilingual sites after Wikidata reconciliation in OpenRefine

I have a column of reconciled entities in OpenRefine which include entities like Q56085233 and I would like to retrieve all links inside "Multilingual sites", if possible with a separator or only one at a time.
That is Q56085233, for instance, has two pages, one from "commons" (https://commons.wikimedia.org/wiki/Category:Wikimedia_Tamazight) and the other one from "meta" (https://meta.wikimedia.org/wiki/Wikimedians_of_Tamazight_User_Group).
Is there a way to retrieve both websites from the "Add column from reconciled values" function? Moreover, is it possible to first call only "meta" pages, and then only "commons" pages?
The Wikidata reconciliation service supports special "properties" to fetch such things, as documented at https://wikidata.reconci.link/ (look for "special properties" there).
The links inside the "Multilingual sites" are called "sitelinks". For meta.wikimedia.org they can be fetched by using the Smetawiki code in the "Add columns from reconciled values" dialog. You could similarly fetch sitelinks for other Wikimedia sites (Sitwiki for the Italian Wikipedia, for instance).

Google Analytics custom dimension vs new users

We have multiple e-learning modules under one domain.
We want to know how many new users start each module over a set period of time e.g.
trainingDomain.com/module01 > 4 new starts
trainingDomain.com/module02 > 2 new starts
trainingDomain.com/module03 > 5 new starts
The metric that seems to best fit new starts is new users by module.
We have tried various approaches but no success so far. I suspect we are misunderstanding something conceptual.
Each page in a module saves a moduleID to a custom dimension i.e. click scope. If we create a custom report with new users as the metric and moduleID as the primary dimension, only the first module visited registers in the report.
Does anyone have a suggestion of a better way we can approach this or a way to tweak the current approach to work? I'm really struggling to get my tiny brain around this...
Many thanks!
Actually, custom dimension is redundantly for your purpose.
Create a page content group with your modules. Then create a custom report with the new users as metric, page as a dimension and filter by your content group.

Tracking different domains within 1 view and using filters in GA - is it possible?

Was curious if the following was possible. We have a site, https://mysite.net
Say we want to track https://dev.mysite.net but keep it in the same view. The problem is we have around 80+ instances of different subdomains that they want tracked and the limit is 50. This works when creating different views for each, but I am trying to use filters for each subdomain and it doesn't seem to work.
So at the moment I have one view set to
https://mysite.net.
And 3 filters set to
https://site1.mysite.net
https://site2.mysite.net
https://site3.mysite.net
All are set to "include only" "traffic to the hostname" "that contain"
with the their respective URL.
Will this work does anyone know ? Or do you need different views for sure?
Thanks!
You should be able to create a custom filter type > include with the filter field hostname, and a regex of ^site[1-3]\.mysite\.net$.

How do I create a page that shows two specific nodes?

We want to create a page that shows two specific nodes.
The first node will be localized content (an article node in the user's language). There will be at least 5 different language versions of that page.
The second node will be a Webform node that the user can submit to "sign" the document. It will be language neutral.
Originally I figured that I could have one Webform node and then translate it into the appropriate languages. But what I discovered was that the "translated" version of the Webform node was, in fact, a completely new node--which means a completely new webform. This makes sense if you think about how Drupal handles multilingual content--each translation is a separate node.
But in the case of our webform, we don't want to split the submissions into 10+ different webform submission sets. Everybody who "signs" has their signatures placed into the same "bin" of data.
I can think of two possible solutions:
Create a page that will display two nodes: the localized version of an "article" node (selected depending on the user's language selection), and the webform.
Create multiple Webform nodes (one per language), and then create a MySQL view that merges all the user submissions into a single set of records. This would allow us to extract our data without a great deal of headache.
I'm not sure if 2 is possible. I'm assuming that I'll have to go with 1. But, so far my efforts to accomplish this have also been fruitless! How can I do this?
-Josh
I think 1 is much easy and possible solution. You can create webform node and make body field as php code (for that you need to enable php filter). And put in body follow lines:
<?php
$nid = NODE_ID;
$node = node_load($nid);
$node_view = node_view($node, 'full');
print drupal_render($node_view);
?>
Just replace NODE_ID with nid of multilanguage node.

Drupal 6: creating location list manually or dynamically via cms

I'm starting my first Drupal project, pretty excited :) I have a question;
the project is a hotel directory site. at sidebar I have locations list (London, Manchester, Liverpool, etc..) and filter the hotels related on location click.
So, how should I create these cities? Should I put them manually and give links manually depending on location id? or is there any better way to create this location list and linking filtering dynamically (via cms, or custom module, etc...)
Appreciate advices!!!!
This would be a good example of when to use the core (part of the base Drupal software) Taxonomy module. With Taxonomy you can set up one or more lists of terms that describe some or all of your nodes. For example, you can have a list of locations, a list of amenities (pool, sauna, golf course, etc.), and a list of price ranges (low, medium, high).
For each hotel you can select a location from the locations list, one or more amenities, and a price range. Then you can select all of the hotels that match one of the lists, using a neat feature of Taxonomy where it will return a list of those nodes.
The lists of terms are called "Vocabularies", and you'll want to create a vocabulary for each list. Go to Administer -> Taxonomy -> Add Vocabulary. Give it a name, like "Location" a description if you'd like, and choose the content types that it should be allowed to be associated with. (In your case, the hotels should probably be a custom content type that is different from the Page and Story types, but for trying this out, just pick Page for now.) There are several checkboxes at the bottom to decide on: Don't check Tags or Multiple Select, as these allow free tagging by users (images users making up city names) and also allow a node to have multiple locations. Do check the Required checkbox, as each hotel should have one.
Click Save and then click Add Terms on the vocabulary list page, and add a few locations. Then create a few hotel nodes (Pages for now) and you'll see that there is a new section in the Create Content page that is a dropdown selector that contains the locations. Choose one for each hotel, and add a few hotels in the locations that you just created.
To select the hotels for a given location, you will need to know the path associated with each term. Go back to the Taxonomy admin page and choose List Terms for the Location vocabulary. On the Terms in Location page you can get the list of hotels for a location by clicking on a location's name. The resulting page's path (e.g. example.com/taxonomy/term/2) would be what you'd use in your menu for that location. Each location will have its own term number that would be at the end of the path.
This is the simplest way to use the Taxonomy module, but it works really well with other modules like Views. Using Views you can control the format of the list of hotels for each location.
For more information, see the Taxonomy documentation and especially this sub-page called About Taxonomy.

Resources