Bookmarks
Fast way to check for information on the devstool (chrome´s console)
Create a new bookmark
Click on more
Set a name and after replace the URL with one of the next scripts:
Check monsido info:
javascript: console.clear(); console.table(window._monsido)
OR
javascript: console.clear(); console.log(window._monsido)
Check GTM info:
javascript: console.clear(); console.table(window.dataLayer)
Edit website (for fun):
javascript: console.clear();document.body.contentEditable = 'true'; document.designMode='on'; void 0
Open on new tab sitemap:
javascript: console.clear();window.open("sitemap.xml")
Google Translation (when highlight the text):
javascript:(function(){l=location.href;if(l.indexOf('translate')>=0){l=decodeURIComponent(l.replace(/^.*[&?](trurl|url|u)=/,%27%27).replace(/[&?].*$/,%27%27))};s=document.selection?document.selection.createRange().text:window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection():%27%27;lw=(s==%27%27)?%27http://translate.google.com/translate?u=%27+encodeURIComponent(l)+%27&sl=auto&tl=en&anno=0%27:%27http://translate.google.com/translate_t?text=%27+s+%27&sl=auto&tl=en%27;wt=window.open(lw);if(window.focus){wt.focus()};})()
Take note that you can replace console.table by console.log is the same but the table will show the data inside a table.
Using chrome´s console you are also able to check all the CSS selectors used on a page by typing
document.querySelectorAll(‘.CSSselectorname’)
Useful Chrome extensions and Console (DevsTools)
Tag assistant: https://chrome.google.com/webstore/detail/tag-assistant-legacy-by-g/kejbdjndbnbjgmefkgdddjlbokphdefk?hl=en
Remove CSP: https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden?hl=en
wcag contrast checker: https://chrome.google.com/webstore/detail/wcag-color-contrast-check/plnahcmalebffmaghcpcmpaciebdhgdf?hl=en
SelectorGadget: point and click CSS selectors: https://chrome.google.com/webstore/detail/selectorgadget/mhjhnkcfbdhnjickkkdbjoemdmbfginb?hl=en
CSS overview - Console: https://developer.chrome.com/docs/devtools/css-overview/
chrome devtools performance recording: https://developer.chrome.com/docs/devtools/evaluate-performance/reference/
Chrome dev tips: https://umaar.com/dev-tips/1-port-forward/
Chrome Snippets: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/javascript/snippets
Chrome sources: https://developer.chrome.com/docs/devtools/javascript/sources/
Consent Manager
Documentation for customers: https://developer.monsido.com/ https://help.monsido.com/en/articles/5519385-consent-manager
Internal documentation: GDPR vs CCPA All in one document for Sales
Monsido Product Guides: https://monsido.wistia.com/projects/0m1o7juj5t
Sales/CS Enablement Channel: https://monsido.wistia.com/projects/ieafg4b23z
https://help.monsido.com/en/articles/5556032-google-tag-manager-monsido
https://support.google.com/tagmanager/answer/6103696?hl=en&ref_topic=3441530
https://monsido.wistia.com/medias/tmzxbk8wzx
Monsido Consent Manager - how to it setup?
All the technical documentation lives here: https://developer.monsido.com/consent-manager/intro
GTM tag Priority - https://support.google.com/tagmanager/answer/2772421?hl=en
Tag Firing Priority: Determines the order in which tags will be fired. The value can be a positive or negative integer, and tags with higher values will fire before those with lower values. (For example, a priority 3 tag will fire before a priority 1 or 2 tag.) Priority defaults to 0 if no value is specified. Tags will still fire asynchronously.
How to check error messages using consolehttps://support.happyfox.com/kb/article/882-accessing-the-browser-console-and-network-logs/
Renew the consent (make the banner reappear):
<a href="javascript: window.monsidoConsentManager.renewBanner()">Change your consent</a>
Withdraw the consent
<a href="javascript: window.monsidoConsentManager.withdrawConsent()">Change your consent</a>
Snippets
Extract URLs from website
const results = [
['Url', 'Anchor Text', 'External']
];
var urls = document.getElementsByTagName('a');
for (urlIndex in urls) {
const url = urls[urlIndex]
const externalLink = url.host !== window.location.host
if(url.href && url.href.indexOf('://')!==-1) results.push([url.href, url.text, externalLink]) // url.rel
}
const csvContent = results.map((line)=>{
return line.map((cell)=>{
if(typeof(cell)==='boolean') return cell ? 'TRUE': 'FALSE'
if(!cell) return ''
let value = cell.replace(/[\f\n\v]*\n\s*/g, "\n").replace(/[\t\f ]+/g, ' ');
value = value.replace(/\t/g, ' ').trim();
return `"${value}"`
}).join('\t')
}).join("\n");
console.log(csvContent)
Check imgs source on a page// Debug images
{
console.clear();
const images = document.querySelectorAll('img');
const missingAlt = []
const emptyAlt = []
const suspiciousAlt = []
const missingDimensions = []
const suspicious = ['alt', 'image', 'img', 'logo']
if (images.length) {
for (let i = 0; i < images.length; i++) {
const image = images[i];
if (image.getAttribute('alt')) {
const attr = image.getAttribute('alt').trim();
if (attr === '') {
emptyAlt.push(image)
}
if (suspicious.indexOf(attr) > -1) {
suspiciousAlt.push(image)
}
} else {
missingAlt.push(image)
}
if (!image.attributes.width || !image.attributes.height) {
missingDimensions.push(image)
}
}
if (suspiciousAlt.length) {
console.warn('%cImages with suspicious alt, please check!', 'font-size: 13px');
for(image of suspiciousAlt) {
console.log(image)
}
}
if (missingDimensions.length) {
console.warn('%cImages without width and/or height attribute, please check!', 'font-size: 13px');
for(image of missingDimensions) {
console.log(image)
}
}
if (emptyAlt.length) {
http://console.info ('%cImages with empty alt', 'font-size: 13px;');
for(image of emptyAlt) {
console.log(image)
}
}
if (missingAlt.length) {
console.error('%cImages with missing alt', 'font-size: 13px;');
for(image of missingAlt) {
console.log(image)
}
}
}
if (![...suspiciousAlt, ...missingDimensions, ...emptyAlt, ...missingAlt].length) {
http://console.info ('All images look OK!')
}
var done = 'Finished running “Debug images”'
done;
}
View Cookies
console.clear();
(function() {
'use strict';
window.viewCookies = function() {
if (document.cookie) {
const cookies = document.cookie
.split(/; ?/)
.map(s => {
const [ , key, value ] = s.match(/^(.*?)=(.*)$/);
return {
key,
value: decodeURIComponent(value)
};
});
console.table(cookies);
}
else {
console.warn('document.cookie is empty!');
}
};
})();
window.viewCookies();
Show Headers
console.clear();
(function() {
var request=new XMLHttpRequest();
request.open('HEAD',window.location,true);
request.onload = request.onerror = function () {
var headers = request.getAllResponseHeaders();
var tab = headers.split("\n").map(function(h) {
return { "Key": h.split(": ")[0], "Value": h.split(": ")[1] }
}).filter(function(h) { return h.Value !== undefined; });
console.group("Request Headers");
console.log(headers);
console.table(tab);
console.groupEnd("Request Headers");
};
request.send(null);
})();
Performance of the page
console.clear();
(function () {
var t = window.performance.timing;
var lt = window.chrome && window.chrome.loadTimes && window.chrome.loadTimes();
var timings = [];
timings.push({
label: "Time Until Page Loaded",
time: t.loadEventEnd - t.navigationStart + "ms"
});
timings.push({
label: "Time Until DOMContentLoaded",
time: t.domContentLoadedEventEnd - t.navigationStart + "ms"
});
timings.push({
label: "Total Response Time",
time: t.responseEnd - t.requestStart + "ms"
});
timings.push({
label: "Connection",
time: t.connectEnd - t.connectStart + "ms"
});
timings.push({
label: "Response",
time: t.responseEnd - t.responseStart + "ms"
});
timings.push({
label: "Domain Lookup",
time: t.domainLookupEnd - t.domainLookupStart + "ms"
});
timings.push({
label: "Load Event",
time: t.loadEventEnd - t.loadEventStart + "ms"
});
timings.push({
label: "Unload Event",
time: t.unloadEventEnd - t.unloadEventStart + "ms"
});
timings.push({
label: "DOMContentLoaded Event",
time: t.domContentLoadedEventEnd - t.domContentLoadedEventStart + "ms"
});
if(lt) {
if(lt.wasNpnNegotiated) {
timings.push({
label: "NPN negotiation protocol",
time: lt.npnNegotiatedProtocol
});
}
timings.push({
label: "Connection Info",
time: lt.connectionInfo
});
timings.push({
label: "First paint after Document load",
time: Math.ceil(lt.firstPaintTime - lt.finishDocumentLoadTime) + "ms"
});
}
var navigation = window.performance.navigation;
var navigationTypes = { };
navigationTypes[navigation.TYPE_NAVIGATENEXT || 0] = "Navigation started by clicking on a link, or entering the URL in the user agent's address bar, or form submission.",
navigationTypes[navigation.TYPE_RELOAD] = "Navigation through the reload operation or the location.reload() method.",
navigationTypes[navigation.TYPE_BACK_FORWARD] = "Navigation through a history traversal operation.",
navigationTypes[navigation.TYPE_UNDEFINED] = "Navigation type is undefined.",
console.group("window.performance");
console.log(window.performance);
console.group("Navigation Information");
console.log(navigationTypes[navigation.type]);
console.log("Number of redirects that have taken place: ", navigation.redirectCount)
console.groupEnd("Navigation Information");
console.group("Timing");
console.log(window.performance.timing);
console.table(timings, ["label", "time"]);
console.groupEnd("Timing");
console.groupEnd("window.performance");
})();
Page information
{
console.clear()
const getAttr = (elem,attr)=>{
if (document.querySelector(elem) && document.querySelector(elem).getAttribute(attr))
return document.querySelector(elem).getAttribute(attr);
return "🛑 No information available"
}
console.log('---------')
console.log(`%cTitle: ${document.title}`, `font-size: 14px`);
console.log(`OG Title: ${getAttr('meta[property="og:title"]', 'content')}`)
console.log(`Description: ${getAttr('meta[name="description"]', 'content')}`)
console.log(`OG Description: ${getAttr('meta[property="og:description"]', 'content')}`)
console.log(`OG image: ${getAttr('meta[property="og:image"]', 'content')}`)
console.log(`Language: ${getAttr('html', 'lang')}`)
console.log(`Charset: ${getAttr('meta[charset]', 'charset')}`)
console.log(`Viewport: ${getAttr('meta[name="viewport"]', 'content')}`)
console.log(`Canonical URL: ${getAttr('link[rel="canonical"]', 'href')}`)
console.log(`DOM nodes in <head>: ${document.head.querySelectorAll('*').length}`)
console.log(`DOM nodes in <body>: ${document.body.querySelectorAll('*').length}`)
const internalStylesheet = document.querySelectorAll('style');
console.groupCollapsed(`Number of <style> elements: ${document.querySelectorAll('style').length}`)
for (var i = 0; i < internalStylesheet.length; i++) {
console.log(internalStylesheet[i])
}
console.groupEnd();
const externalStylesheet = document.querySelectorAll('link[rel="stylesheet"]');
console.groupCollapsed(`Number of external stylesheets: ${externalStylesheet.length}`)
for (var i = 0; i < externalStylesheet.length; i++) {
console.log(externalStylesheet[i].href)
}
console.groupEnd();
const internalScript = document.querySelectorAll('script:not([src])');
console.groupCollapsed(`Number of inline <script> elements: ${internalScript.length}`)
for (var i = 0; i < internalScript.length; i++) {
console.log(internalScript[i])
}
console.groupEnd();
const externalScript = document.querySelectorAll('script[src]');
console.groupCollapsed(`Number of external <script> elements: ${externalScript.length}`)
for (var i = 0; i < externalScript.length; i++) {
console.log(externalScript[i].src)
}
console.groupEnd();
console.log('---------')
var done = 'Finished running “Doc Info”'
done;
}
Scanner
Always check for constrains and excludes
Related to jobs and career - release scan
Not trust the same nr of pages - i.e: 10k - 10k
Check if the same path is repeated on new and missing on same file
Doubts? NEW SCAN!!!!
New domain (replaced under the same domain account) - URL rewrite
Https:// to https://www or vice versa - URL rewrite
Verify if there are links on the website for the missing page
Check if link is not giving any error message in the response
Scanner stages
PREPARING, ::Crawl
CRAWLING, ::Crawl: 0%
POSTPROCESSING, ::Crawl
ON_HOLD, ::Crawl SUPPORT then 50%
CLASSIFY_LINKS then 55%
SEO then 60%
SPELL_CHECK then 65%
DATA_PROTECTION then 70%
COOKIE_SCAN then 73%
SYNCHRONIZING, ::Crawl SYNCHRONIZED then 75%
POLICIES then 80%
UPDATING_COUNTERS then 85%
SCORING_LINKS then 90%
UPDATING_GROUPS then 95%
UPDATING_SCORES then 97 % else 99%
Scan on retry
Check is URL is correct - Check for spelling errors, if the website is using or not SSL (https), etc
Ping the domain/website - https://support.n4l.co.nz/s/article/How-to-use-Ping
Whitelist of Monsido´s IP - https://www.techopedia.com/definition/1728/whitelist
check for canonicals - https://ahrefs.com/blog/canonical-tags/
Review if there are no CSP (content security policies) blocking -https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
Review the excludes and constraints set under the domain settings
Look into the console/ network and see if the request of the page is 200ok -https://developer.chrome.com/docs/devtools/network/
SCAN - Customer not replying - if nothing is happening, remember to close the ticket, rejecting the scan and disabling the automatic scan for this domain