Problem/Motivation

Currently, we have "posthog_js/init" as a dependency of "posthog_cookies" js. This creates a case, where init.js is loaded, but doesn't have access to the posthog settings, since some conditions in posthog_js_page_attachements don't apply.

We don't want to have this case.

Steps to reproduce

Proposed resolution

Alter the dependency of the init.js and add cookies as a dependency.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork posthog-3506076

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

grevil created an issue. See original summary.

grevil’s picture

Assigned: Unassigned » anybody
Status: Active » Needs review

All done! Please review!

grevil’s picture

Assigned: anybody » grevil
Status: Needs review » Needs work

Good thing I implemented the tests again: "2 elements matching css "script[src*="https://eu-assets.i.posthog.com"]" found on the page, but should be 1"

I'll see what causes this.

grevil’s picture

Assigned: grevil » Unassigned
Status: Needs work » Needs review

All done! Please review!

anybody’s picture

Status: Needs review » Reviewed & tested by the community

LGTM

  • anybody committed ce665a4f on 1.x authored by grevil
    Issue #3506076: Only knock out if posthog_init is actually loaded
    
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.