Accounts suspended issues

29 views
Skip to first unread message

Paulo Silva

unread,
Mar 27, 2024, 7:21:28 PMMar 27
to Google Ads API and AdWords API Forum
Hello, everyone!

Our product is designed to facilitate sales tracking on Google Ads for products from platforms like Clickbank, Buygoods, among others.

Our product is aimed at affiliates who use Google Ads as a platform for product advertising.

In practice, our users install our custom-generated code snippet on their landing pages, and through this snippet, we collect important information about the buyers and visitors of the ad.

Thus, we can generate detailed reports to enable the optimization of campaigns.

It happens that some of our users have reported having their accounts suspended after using our product.

I would like to know if there is any connection between the suspended accounts and our snippet.

Below, I insert the snippet code:

let filtripixel_trackingId = 0;
let filtripixel_pixelId = '';
let filtripixel_interactionEnabled = false;
let filtripixel_lastScrollPosition = 0;
let filtripixel_lastReportedScrollPercentage = 0;
let filtripixel_verify_installation = false;

function filtripixel_preventInteraction(event) {
if (!filtripixel_interactionEnabled) {
event.preventDefault();
event.stopPropagation();
}
}

function filtripixel_getTrackingId(params) {
const body = {
events: [
{
type: 'visit',
...params,
},
],
pixelId: filtripixel_pixelId,
};
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
};

fetch('https://filtripixel.io', options)
.then((response) => response.json())
.then((response) => {
filtripixel_trackingId = response.trackingId;
filtripixel_setTrackingIdOnAllLinks(response.trackingId);
})
.catch((err) => {
filtripixel_interactionEnabled = true;
document.removeEventListener('click', filtripixel_preventInteraction, true);
});
}

function filtripixel_sendEvents(params, eventType) {
const body = {
trackingId: filtripixel_trackingId,
pixelId: filtripixel_pixelId,
events: [
{
type: eventType,
...params,
},
],
};
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
};

fetch('https://filtripixel.io', options).catch((err) => {
filtripixel_interactionEnabled = true;
document.removeEventListener('click', filtripixel_preventInteraction, true);
});
}

function filtripixel_getParamsFromQueryString() {
const currentUrl = new URL(window.location.href);
const params = new URLSearchParams(currentUrl.search);
const visitParameters = {};

params.forEach((value, key) => {
visitParameters[key] = value;
if (key === 'filtripixel-installation-verify') {
if (value === filtripixel_pixelId) {
alert('Filtripixel instalado com sucesso');
}
}
});
filtripixel_getTrackingId(visitParameters);
}

function filtripixel_setTrackingIdOnAllLinks(trackingId) {
const links = document.querySelectorAll('a');
links.forEach((link) => {
if (link.href) {
try {
const linkUrl = new URL(link.href);
const params = ['tid', 'subid', 'sid1', 'sck', 'src'];
params.forEach((param) => {
linkUrl.searchParams.set(param, trackingId);
});
link.href = linkUrl.href;
filtripixel_interactionEnabled = true;
document.removeEventListener('click', filtripixel_preventInteraction, true);
const readyDiv = document.createElement('div');
readyDiv.id = 'filtripixel_is_ready';
readyDiv.style.display = 'none';
document.body.appendChild(readyDiv);
} catch (error) {
console.error(error);
}
}
});
}

function filtripixel_calculateScrollPercentage() {
const scrolled = window.scrollY;
const viewportHeight = window.innerHeight;
const fullHeight = document.documentElement.scrollHeight;
const scrolledPercentage = Math.min(((scrolled + viewportHeight) / fullHeight) * 100, 100);
return scrolledPercentage;
}

function filtripixel_handleScrollEvent() {
const currentScrollPosition = window.scrollY;
const currentScrollPercentage = filtripixel_calculateScrollPercentage();

const scrollDirection =
currentScrollPosition > filtripixel_lastScrollPosition ? 'scroll-down' : 'scroll-up';

const reportingThreshold = 10;
if (
Math.abs(currentScrollPercentage - filtripixel_lastReportedScrollPercentage) >=
reportingThreshold
) {
filtripixel_sendEvents({ percentage: Math.round(currentScrollPercentage) }, scrollDirection);

filtripixel_lastReportedScrollPercentage = currentScrollPercentage;
}

filtripixel_lastScrollPosition = currentScrollPosition;
}

function filtripixel() {
filtripixel_getParamsFromQueryString();
document.addEventListener('click', function (event) {
let target = event.target;

while (target && target !== document.body && target.nodeName !== 'A') {
target = target.parentNode;
}

if (target && target.nodeName === 'A') {
const params = Array.from(target.attributes).reduce((acc, attr) => {
acc[attr.name] = attr.value;
return acc;
}, {});
filtripixel_sendEvents(params, 'click');
}
});
window.addEventListener('scroll', filtripixel_handleScrollEvent);
}

document.addEventListener('DOMContentLoaded', function () {
document.addEventListener('click', filtripixel_preventInteraction, true);
const scriptTags = document.getElementsByTagName('script');
for (let script of scriptTags) {
if (script.src.includes('filtripixel.minify.js')) {
const url = new URL(script.src);
filtripixel_pixelId = url.searchParams.get('pixelId');
if (filtripixel_pixelId) {
filtripixel();
break;
}
}
}
});

Google Ads API Forum Advisor

unread,
Mar 27, 2024, 8:43:49 PMMar 27
to pa...@extractify.com.br, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Could you please confirm if you're encountering any specific error message after implementing the code in your Google Ads account? If so, please provide the complete error message. This will help us understand the issue better. However, if there are no error messages, I would recommend you reach out to the Google Ads Product support team as they are better equipped to assist you on this concern. Kindly note that this support channel specializes in Google Ads API related concerns and technical implementations only.

I would suggest you refer to this help center article to know more about Google Ads Account Suspensions. Please refer to this help center article to Fix your suspended account.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02s0IoL:ref" (ADR-00229012)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages