Confusion About How Anchor Links Work in Divhunt

I have noticed that when you use anchor links in Divhunt, the #anchor-id does not appear in the URL as I usually expect to see. I think this is affecting something I am trying to do with linking to specific slides in a carsousel using anchor links… It’s hard to explain exactly what the issue and question is by typing without showing so I made a video that is super clear I think, so please see the video:

Screen Recording - Question About Anchor Links

Can you offer any insight as to what is going on here?

Currently with our native scroll to anchor, we don’t add hash on top, we just directly scroll to the bottom.

What you can try is to add JavaScript that will do that on it’s own.

It should look something like this:

    $(".myAnchorButton").click(function(event) {
        event.preventDefault(); 
        owl.trigger('to.owl.carousel', [$(this).index()]); 
    });

If you know JavaScript I believe you can figure it out, if not, you can let me know, and I can do it for you.

Thanks for the response @Pakic, understood. I do not know Javascript, but am seriously considering that I should sit my ass down and learn. But in the meantime and because that will take a while, if you could help me out with a specific copy-pastable script, that would be more than awesome :muscle:

Hi @Pakic I never managed to figure out how to set this up using Javascript as in your example. I have moved on to another anchor link use case than when I originaly asked this question, I am trying to create an anchor link that allows users to change their cookie consent settings.

When someone clicks a link that has the anchor #manage_cookies it is supposed to open the cookie consent settings, but it does not. It does work on my wordpress site though.

I tried some Javascript but I am just not having success. Can you assist?

Here is a video with my use case:

what is the name of cookie script? I dont see when I open a website at all?

The cookie script is deployed via GTM. Here I have copy pasted it for you:

https://app.enzuzo.com/apps/enzuzo/static/js/__enzuzo-cookiebar.js?uuid=fbc23164-f098-11ee-8417-3730fa96edc3

Here is a URL of the website I am working on, it is my template page:

Are you seeing the cookie banner? If not try disabling any Ad Blocker or go in ingonito mode. You problably know that, just throwing it out there. You can also delete the cookie consent cookies in dev mode > Applications > Cookies if you want to reset the consent after you have accepted it once:

I have fixed it by applying same class and ID to that button that was on “Configure” button in popup.

Btw, cookie banner shouldnt be blocked by my Ad Blocker, but it is… Does this say much about quality of enzuzo? :joy:

1 Like

Thanks man, appreciate it! That is a very interesting solution, I would not have thought of trying that.

It looks like your Ad Blocker is doing it’s job then!

But on the serious side, the cookie banner, should be visible even with an ad blocker, when it is on a deployed page that has it’s own domain and tracking sudomain, with GTM Server Side Tagging active.

At least, I can see the banner even when I have U-block origin enabled for example here: https://tattoos.lovemachinenyc.com/ < On that page I have the fancy GTM stuff enabled and hopefully correctly configured.

The page I was working on that you helped me with is the ‘template’ page that does not have Server Side Tagging enabled.

Your comment definitely made me double check it lol. I still don’t feel super confident… I definitely don’t want my consent setup to prevent my tracking pixels from firing and be impossible for visitors to enable it due to the Cookie Banner being prevented from loading due to some omission in my configuration.