1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to get a Hubspot cookies in Angular 17?

Discussão em 'Angular' iniciado por Yurii Shevchuk, Outubro 17, 2024 às 12:13.

  1. I want to ask about the Hubspot cookies. I have a website with Hubspot integration, and there is a login email in cookies when I logged in. How can I check that email in cookies like in an example above? 'ngx-cookies-service' doesn't see the Hubspot fields. 'document.cookie' also doesn't have the Hubspot cookie. Thanks in advance!

    I need to check the visitor email here for redirect to login or sign-up page on button click:

    goToConsole(url: string) {
    const visitor = this.#apiService.hubspotVisitor();
    if (visitor) {
    window.open(url + '/auth/login', '_self');
    } else {
    window.open(url + '/auth/registration', '_self');
    }
    }


    this example is not working:

    import { CookieService } from 'ngx-cookie-service';

    constructor(private cookieService: CookieService) {}

    this.visitorEmail = this.cookieService.get('hs_login_email');

    Continue reading...

Compartilhe esta Página