Skip to content

Conversation

@AhmedLukmanTR
Copy link
Collaborator

What's in this pull request

The PR code checks if a user is logged in (by looking for an ArcId user profile in localStorage), and if they are not logged in, it loads a the advertising script specifically for a div with "reuters_1x1_bouncex" id.

Before submitting, please check that you've ...

  • Read our contributing guide
  • Documented any new components or features
  • Tagged an editor to review this PR

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2024

⚠️ No Changeset found

Latest commit: af6a222

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

let isLoggedIn = localStorage.getItem('ArcId.USER_PROFILE') !== null;
if (!isLoggedIn) {
const script = document.createElement('script');
script.textContent = `p
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the p here intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, apologies, that was a mistype. I will rectify that.

});
</script>

<div id="reuters_1x1_bouncex"></div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain if this div displays an ad, how that behaves and how this ad unit interplays with our existing InlineAd component, if at all? E.g., should we prefer this ad unit and fallback to an InlineAd if the user is not logged in? Something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants