VWO script is being added to every page of the website

Created on 17 July 2024, 4 months ago
Updated 18 July 2024, 4 months ago

Problem/Motivation

When we install the VWO module, the VWO scripts are being added to every page on the website:

  • Content pages (Nodes)
  • Taxonomy term pages i.e. tags
  • User page i.e. /user/1
  • Admin pages i.e. /admin/config

Note: The moment I select 'Article' content type, the scripts are no longer added to the list above i.e. term pages, admin pages, etc

Concerns

Steps to reproduce

  1. Download and enable VWO module
  2. Configure the module with ID, etc, but don't select any content type
  3. Visit the pages below and observe that there are two calls to dev.visualwebsiteoptimizer.com
    1. Content pages (Nodes)
    2. Taxonomy term pages i.e. tags
    3. User page i.e. /user/1
    4. Admin pages i.e. /admin/config

Proposed resolution

First I would like to know if it is really necessary to add VWO scripts to every page or it is just node pages.
If it is node pages, we could add code to check if the page being viewed is a node. That would prevent the script from being added globally.
Once the site builder selects the node type, then we do as we do today i.e. filter by node type

Remaining tasks

- Understand the requirement for the script placement
- Fix the issue

Screenshots

The description does not mention that the scripts will be added to every page if we don't select a content type

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom marcelovani London

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024