Streaming live at 10am (PST)

Sort CMS by Popular posts - I have half a solution!


So I’ve been desperately trying to figure out a way to sort posts using the amount of view, but of course, Webflow doesn’t support this. I’ve seen people suggesting using Zapier but you can only get new Google Analytics Goal as triggers in Zapier, so here’s what I’ve attempted.

  1. Get Google Analytics Blog views into Google Sheets that updates once a day.
  2. Use Sheet & Zapier to update a views field in the Blog Article CMS.

So #1 was easy. Used the Google Sheets Google Analytics addon to create a report that filtered for Blog Posts and runs once a day:
Then added a sheet that would be used by on a daily bases to get the views and slug for Zapier using an Array and regexreplace:

The idea here was that I could update the CMS posts on a daily basis with the new Views. I regexed the slug as I can’t use Title (we have posts with the same name for different regions, so would need their slug and not title to find the post to update).

This is pretty much how far I got. I’ve got two issues, one, how do I update just the views field for the post? Two, can I identify the post using it’s slug and not it’s Title?

Hoping someone has the experience or brainpower to figure out his last step.

Project Read Only

For issue one, use the Patch item request to update only the field you want to change.
For issue two identify the post by its unique id which resolves the ‘same name for different regions’ issue.

1 Like

How would I get the unique ID via Google Analytics can I capture it in Tag Manager or something?

You will see this in the CMS API response.

@Gail_Ranger Sorry, not sure what you mean here, what API response? I’m getting the views from the GA and the rest is Zapier so no IDs in GA?

Sorry for the confusion I’m referring to the Webflow CMS API. I assume you would be able to read the ID from Zapier but I haven’t tried it.