• Resolved Dave

    (@csn123)


    I’m getting a console error and can’t work out how to fix it. It reads “vgo is not defined” and is triggered by this line:

    <script>document.addEventListener("cmplz_fire_categories",function(e){var consentedCategories=e.detail.categories;if(cmplz_in_array('marketing',consentedCategories)){vgo('process','allowTracking');}});</script>

    Is this a core issue, or something specific to one of the scripts I’m using Complianz to manage?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @csn123,

    It’s the ActiveCampaign integration under Complianz > Integrations > Plugins, which enables tracking with the line vgo('process','allowTracking'); after consent is obtained.

    So I expect that ActiveCampaign is not loaded anywhere on this page, resulting in a “vgo() is undefined” error when Complianz tries to enable tracking after consent.

    You can either add the ActiveCampaign script to the page, or disable the ActiveCampaign integration under Complianz > Integrations > Plugins to resolve the behavior.

    And in an upcoming version of the Complianz plugin, we will take into account this situation where the integration is enabled in Complianz, but where ActiveCampaign itself isn’t present on the page; to prevent this error from appearing in those cases.

    Kind regards, Jarno

    Thread Starter Dave

    (@csn123)

    Brilliant, thanks for this.

    Active Campaign runs on selected pages on the site, but not all. I’ll see what options are available to me here, but look forward to seeing the change planned in the plugin.

    • This reply was modified 1 year, 11 months ago by Dave. Reason: Added note on current setup
    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @csn123,

    Just to add: you can also fix it manually in the meantime, by navigating to /wp-content/plugins/complianz-gdpr/integrations/plugins/ and editing the activecampaign.php file.

    Replace the <script></script> part on lines 9 until 16 with the below code:

    <script>
    		if ( typeof vgo === 'function' ) {
    			document.addEventListener("cmplz_fire_categories", function (e) {
    				let consentedCategories = e.detail.categories;
    				if (cmplz_in_array('marketing', consentedCategories)) {
    					vgo('process', 'allowTracking');
    				}
    			});
    		}
    </script>

    Kind regards, Jarno

    • This reply was modified 1 year, 11 months ago by jarnovos.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Vgo is not defined’ is closed to new replies.