• Members 23 posts
    Sept. 21, 2023, 10:40 a.m.

    What is the most effective method for monitoring when a user accesses one or more of the 20 FAQs on a website page?

  • Mod
    Sept. 21, 2023, 10:41 a.m.

    Utilizing Google Tag Manager, you have the option to monitor the initiation of FAQs and trigger an event when users click on any of them.

  • Members 23 posts
    Sept. 21, 2023, 10:43 a.m.

    Thank you for your response, @agkhy . I'm relatively new to Google Analytics (GA) and have been delving into its functionalities. Could you provide more detailed guidance? My objective is to track which FAQs users are accessing, and it's possible that they may open more than one FAQ.

    I'm uncertain whether I should modify an existing event (and if so, which event that would be) – which, if I understand correctly, would overwrite the previous unmodified event. Alternatively, should I create a single custom event and then add 20 custom dimensions to that event, each named individually for the 20 FAQs?

    Subsequently, I assume I need to place these 20 event/dimension tags at specified locations within the corresponding FAQ sections in the HTML code, is that correct? Can Google Tag Manager accurately insert these codes into each FAQ, or would I require someone with HTML coding expertise to do so?

    Alternatively, do I need to create 20 separate custom events, with each one individually named for each FAQ? Once again, I assume that I would need to insert these tags at designated locations within the respective FAQs.

  • Members 24 posts
    Sept. 21, 2023, 10:46 a.m.

    1) To create a custom event, you typically start by selecting a pre-defined event (such as "page_location") and then specify a value (like the page URL). In my case, this action places the tag on the FAQ page. Generally, you can't invent a new event that didn't exist previously. Is my understanding correct?

    2) Regarding the custom event dimensions, my goal is to identify which of the FAQs have been opened. Users can click on plus "+" signs to reveal answers for each of the 20 different FAQs, and I want to track exactly which ones were opened, not just the overall count. How can I instruct Tag Manager to distinguish each "+" click? I considered using a text string to identify each question, but it seems crucial to register the click on the "+" sign itself.

    Do you have any recommendations on how to achieve this? I imagine this must have been done before, and I'd appreciate any insights.

  • Mod
    Sept. 21, 2023, 10:48 a.m.

    This is certainly achievable, but it's not a straightforward solution, especially for someone with limited experience...

    Essentially, in GTM preview mode, you should explore the available variables when a user interacts with your FAQ accordion, such as identifying click IDs.

    Here's my suggested approach (assuming you can make modifications to the HTML):

    1. Add a data-attribute to each of the clickable FAQ items and track these. If only one element is clickable, GTM will automatically make these available as the element.dataset, and you can base your tag triggers on these data-attributes.

    2. However, in many cases, users can click on multiple nested elements to open an FAQ accordion. In this scenario, you'll need to traverse the element tree to locate the nearest one with your attribute. You can utilize {{Click Element}}.closest for this purpose.