Skip to content

Single Modal loading twice with exclude scaffolding #636

@ashyablok

Description

@ashyablok

Related: https://github.com/lytics/lytics-ui/issues/2082

We ran into a scenario where a single modal was loading twice. Causing the following error in the console:

image

For context, the account had both experiences and legacy personalize campaigns. There were domains set in the orchestrate allowlist, but the domain in question was not in that list, thus personalize campaigns were loading. There was one active campaign that was loading, but it wasn't even set to display on the domain in question. The config had both the target and exclude set in the scaffolding, which resulted in the following in the config:

w.pathfora.utils.insertWidget("target","all",pfa_111,widgetConfig)
w.pathfora.utils.insertWidget("exclude","111_conversion",pfa_111,widgetConfig)

Testing this locally did not result in an error, but when loaded by the config.js by the jstag it caused the console error.

We believe it has something to do with the exclude render code:
https://github.com/lytics/pathforajs/blob/develop/src/rollup/widgets/init-targeted-widgets.js#L34-L62

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions