Skip to content

Commit

Permalink
refactor: update logs and css for matomo tracking component
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jun 2, 2024
1 parent 75a6ec5 commit f440056
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions components/Tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export class Tracking extends LitElement {
font-weight: var(--sl-font-weight-bold);
font-size: var(--sl-font-size-large);
color: #d63f3f;
}
#hot-red-text {
color: #d63f3f;
text-align: center;
}
sl-alert::part(base) {
position: absolute;
Expand All @@ -53,6 +51,7 @@ export class Tracking extends LitElement {
transform: translateX(-50%);
z-index: 1000;
width: 80vw;
text-align: center;
}
`
];
Expand All @@ -73,16 +72,16 @@ export class Tracking extends LitElement {
and measure traffic usage and activity. You can learn about how we use the data
about your visit or information you provide reading our
<a
id="hot-red-text"
style="color: #d63f3f;"
href="https://www.hotosm.org/privacy"
target="_blank"
rel="noopener noreferrer"
>privacy policy</a>.
By clicking "I Agree", you consent to the use of cookies.
</p>
<sl-button @click=${this._setAgree}>I Agree</sl-button>
<sl-button @click=${this._setDisagree}>I Do Not Agree</sl-button>
<sl-button @click=${(e: MouseEvent) => {this._setAgree(e)}}>I Agree</sl-button>
<sl-button @click=${(e: MouseEvent) => {this._setDisagree(e)}}>I Do Not Agree</sl-button>
</sl-alert>`;
}

Expand Down Expand Up @@ -113,7 +112,7 @@ export class Tracking extends LitElement {

// Close and halt execution if wrong domain
if (!this.force && window.location.hostname !== this.domain) {
console.warn('Matomo init failed. Provided domain does not match current domain.');
console.warn(`Matomo init failed. ${window.location.hostname} does not match ${this.domain}.`);
this.isOpen = false;
return;
}
Expand Down

0 comments on commit f440056

Please sign in to comment.