Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const priceCheck = () => {
- let price = document.querySelector(".landing #pricelist .head");
- if (!price) { return; }
- price = price.getBoundingClientRect().top - window.innerHeight;
- if ( price <= 0 ) {
- Analytics.yaCounter('landingPrice');
- Analytics.googleAnalytics('send','event','scrollEvents','landingPrice');
- if (key == "perm" && template == 53) {
- Analytics.roistatGoal('Достиг прайса на /apple', "", 0);
- Analytics.roistat("to-price-apple");
- }
- window.removeEventListener("scroll", priceCheck);
- }
- };
- const footerCheck = () => {
- let footer = document.querySelector('.landing footer');
- if (!footer) { return; }
- footer = footer.getBoundingClientRect().top - window.innerHeight;
- if ( footer <= 0 ) {
- Analytics.yaCounter('landingFooter');
- Analytics.googleAnalytics('send','event','scrollEvents','landingFooter');
- window.removeEventListener("scroll", footerCheck);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement