Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'metrika-yandex-tag' — scriptlet does not work if request is blocked by DNS #472

Open
Alex-302 opened this issue Dec 23, 2024 · 1 comment

Comments

@Alex-302
Copy link
Member

Alex-302 commented Dec 23, 2024

AdGuard for Windows 7.20 n5
Chrome

Steps to reproduce

  1. Disable ||mmdm.ru/static/users/js/login.*.js$replace=/yaCounter\d+\.reachGoal\('\w+'\);// in Tracking Protection filter
  2. Enable AdGuard default DNS or DNS filter
  3. Open https://mmdm.ru/underground-parking/
  4. Click Login button

Then try with mmdm.ru#%#//scriptlet('metrika-yandex-tag')

Actual behaviour

Popup does not open in both cases:

image

Expected behaviour

Yandex Metrika swapped by the scriptlet.
Without DNS filtering metrika-yandex-tag redirect rule applied successfully without the need for additional rules.

@Alex-302 Alex-302 added the bug Something isn't working label Dec 23, 2024
Alex-302 added a commit to AdguardTeam/AdguardFilters that referenced this issue Dec 23, 2024
@adguard-bot adguard-bot changed the title #%#//scriptlet('metrika-yandex-tag') does not work Fix 'metrika-yandex-tag' — scriptlet does not work if request is blocked by DNS Dec 23, 2024
@AdamWr
Copy link
Member

AdamWr commented Dec 23, 2024

If I'm not wrong, adding init to api object:

const api = {
addFileExtension,
extLink,
file,
getClientID,
hit: hitFunc,
notBounce,
params,
reachGoal,
setUserID,
userParams,
destruct,
};

should fixes it.

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

No branches or pull requests

3 participants