I've installed google analytics reports to be able to see the most viewed nodes of my website. I were able to add the Top Pages view to my home page but i wanted to know how can i :

  1. add published date
  2. remove the number count and leave the title only.

See image

enter image description here

1 Answer 1


You're looking a one difficult task & one simple one. Starting with the simple one (reverse order):

  1. The Top Pages area is a block that's installed with the module. The Google Analytics Reports Summary (Google Analytics): Top Pages view can be configured in the Views UI (/admin/structure/views/view/google_analytics_reports_summary/edit/attachment_top_pages). To remove the views count you can click the Page Tracking: Pageviews field and use the Remove button or Excluded from display checkbox to get rid of it.
  2. Adding the publish data is a bit harder because what the underlying View is querying. The view is querying data tables from your Google Analytics account. As such, there is no Drupal node data to display from the query. Normally, the Views way to solve this would be to add a relationship with the node table then reference the publish date. However, the module doesn't provide a relationship handler to node content so you're looking a couple things here:
    1. Select a Google Analytics field that can be joined on the node table. Page Tracking: Page is a close candidate here as it contains a unique path used for the node link. Nid would be better, but that data isn't sent to Google Analytics by default (you'd have to configure a GA custom variable).
    2. Once you have a selected joined field. You'd have to build your custom relationship handler on which you can join to the node table to retrieve the publish date.
  • I were to remove the pageviews count by removing it from display. Trying to remove it was giving me an error. I will look into the 2nd proposed solution. Thanks
    – mamesaye
    Sep 27, 2016 at 21:38
  • 1
    An alternative is to use the Exclude from display option that you can set on any field that would prevent any broken references.
    – Shawn Conn
    Sep 27, 2016 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.