In addition to page views and other default metrics, you can use Google Analytics to track, for example, clicks of a specific element on the social wall, grid, and carousel layouts.

Your website developers and team members with Google Analytics and Google Tag Manager (GTM) skills can help you with the setup, and in this tutorial, we will give you a concrete example of how you can track clicks of any Flockler layout element. Google calls them 'events', and your team might already track, for example, website’s call-to-action button clicks.

Here you will find Flockler’s Grid layout with Nike’s Instagram posts. Let’s imagine that you’d like to track clicks of the Instagram profile on the top left corner of each post.

Example of a Flockler Grid for social media feed

Here are three steps on how to track clicks of that element with Google Analytics and Google Tag Manager:

Step 1: With the browser’s developer tools, check the element's class name on the Flockler Wall, Grid, or Carousel layout. In Nike’s example above, the class name for the profile icon and the profile name is flockler-grid-item__profile.

If you are unsure which is the correct class name, don’t hesitate to contact our team via live chat.

Step 2: Now, log in to Google Tag Manager and create a new tag.

Create a tag in GTM

Then, select either the Universal Analytics or the GA4 Event. Most users have the Universal Analytics in use.

Selecting the tag type in GTM

Next, set the track type to 'Event' from the drop-down. Add a describing category name, for example, Flockler Grid. Then, add Action name, for example, Grid Profile Click. And finally, set Label to {{Click URL}}.

Google Analytics tag configuration

Step 3: Directly below the Tag Configuration settings, continue to set a trigger for this tag. Choose 'Click - Just Links' and click to edit it. If you don’t have this trigger type in the list, click the + icon on the top right to create it.

Choosing a trigger in GTM

In the edit mode of 'Just Links' trigger, choose that the trigger fires on 'Some Link Clicks'.

From the drop-down on the left, choose 'Built-in variables' and then select 'Click Classes'. In the middle, pick 'contains' from the drop-down. Finally, add flockler-grid-item__profile to the field on the right.

Save changes for both Trigger and the Tag.

That’s all – you should see clicks of the profile element on Google Analytic’s Events tab! 🎉

Did this answer your question?