Hi,

Is it possible to add the node relationship as an option? I can imagine the node ID isn't stored in GA, but shouldn't it be possible to get the node ID via the path?

Kind regards,

Mark

Comments

grendzy’s picture

StatusFileSize
new4.33 KB

It's something I've fiddled with a little. A relationship in the usual way is impossible, because there's no way to "join" GA data with SQL data in a single query. I'm trying to find a way to execute two queries and combine the results before rendering, but Views isn't really designed for this.

Non-working patch attached with my experiment so for.

If you need this functionality now, my advice is to use a theme pre-process function to load the node data, or write your reports using google_analytics_api_report_data().

dwkitchen’s picture

Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new4.02 KB

I have also been looking for a method to do this.

What I came up with is a argument handler. All this offers is the most viewed node ids.

Add nid to the arguments and then select default value, you can now select Google Analytics in the list.

If this looks like a good way to go it can be developed further.

dwkitchen’s picture

Here is a new patch, you can now enter manual options for filters etc.

dwkitchen’s picture

StatusFileSize
new6.66 KB

Updated version with corrections for sorting and filtering.