âď¸What is an SEO Competitor Analysis
An SEO competitor analysis is a process of evaluating and analyzing the SEO strategies and performance of your competitors to gain insights and identify opportunities to improve your own search engine optimization efforts through programmatic SEO approach. It involves studying the websites and online presence of your competitors to understand their organic search rankings, keyword targeting, content strategy, backlink profile, and overall SEO tactics.
How to perform an SEO competitor analysis using Python
Set up a custom search engine
- Create a new search engine
https://programmablesearchengine.google.com/controlpanel/create
Enter a Name for your search engine
- New search engine has been created
Here is a link to the Programmable search engine homepage and within a few clicks, you should be able to set up your own programmable search engine.
https://programmablesearchengine.google.com/controlpanel/all
Then go Customise
- Go to Google Developer Console and click the Get a Key button.
https://developers.google.com/custom-search/v1/overview#api_key
Select your search engine and go Next.
- Competitor Analysis – SERP heatmap Master.ipynb
https://colab.research.google.com/drive/1SqVPj7nYynXFHX8alYkAIp-Pm2ArUNQY?usp=sharing#scrollTo=6d0c64b0
Run and Wait.
Add Keywords and your Search Engine ID & API Key
Run the serp_goog function
View the results of the serp_rankings output
5. Run & Export Data to CSV
7. Run the SERP Heatmap Function
8. Call or Invoke the serp_heatmap function
9. View your SERP Heatmap Data Visualization
âď¸Perform A Cookie Audit of the Website
Cookie Audit Introduction:
Itâs essential today to understand the presence and purpose of cookies on a website. The data privacy landscape is continuing to evolve and there are various laws and regulations in place throughout the world, where cookie compliance is almost always included in some way.
1) Select âCookiesâ For Extraction
Open up the SEO Spider, go to âConfig > Spider > Extractionâ and select âCookiesâ under âURL Detailsâ.
This means the SEO Spider will now store all cookies discovered.
Please note, when you choose to store cookies, the auto exclusion performed by the SEO Spider for Google Analytics tracking tags is disabled to provide an accurate view of all cookies issued.
This means it will affect your analytics reporting, unless you choose to exclude any tracking scripts from firing by using the exclude configuration (âConfig > Excludeâ).
2) Enable JavaScript Rendering
Click âConfig > Spider > Renderingâ and select âJavaScriptâ. This means the SEO Spider will open each web page in a headless Chrome browser behind the scenes.
This is an important step, as it allows cookies that are loaded using JavaScript or pixel image tags to be discovered.
The window size is automatically set to Googlebot Smartphone, but this can be adjusted to desktop if there are any differences in the way the site issues cookies.
3) Set The User-Agent To Chrome
To replicate a regular user, switch the user-agent to a browser, such as Chrome via âConfig > User-agentâ.
Some websites conditionally set cookies based upon user-agent and crawling as the âScreaming Frog SEO Spiderâ may not always give a true picture otherwise.
4) Ignore robots.txt
Click âConfiguration > robots.txt > Settingsâ and select âIgnore robots.txtâ or âIgnore robots.txt but report statusâ.
Cookies can be loaded from URLs which are available to users but not bots, such as pages or resources blocked via robots.txt. Therefore itâs important we allow all resources to be loaded. Any user set Include or Exclude functions can also affect this.
5) Crawl the Website
Open up the SEO Spider, type or copy in the website you wish to crawl in the âEnter URL to spiderâ box and hit âStartâ.
Wait until the crawl finishes and reaches 100%, but you can also view some details in real-time.
6) View Number of Cookies For Each URL
In the âInternalâ tab, thereâs a âcookiesâ column which displays the number of cookies discovered for each URL.
You will need to scroll over to the right to see it. This will help you identify where cookies are being discovered in the crawl.
7) View The Cookies Tab
Click on a URL in the top window, then the lower âCookiesâ tab to populate the lower window pane with more details on cookies discovered for each URL.
You can click on the above image to view a larger version. Youâre able to see granular cookie data for every URL. You can also highlight multiple URLs at a time and view them together (the âaddressâ column on the right shows which URL each is on).
The columns listed in the Cookies tab include:
- Cookie Name â The name of the cookie.
- Cookie Value â The cookie value.
- Domain â The domain that issued the cookie. These can be either first or third party.
- Expiration Time â The cookie expiry time.
- Secure â Details of the cookie secure attribute. True means the âsecureâ attribute is present.
- HttpOnly â Details of the cookie HttpOnly attribute. True means the âHttpOnlyâ attribute is present.
- Address â The URL the cookie was set on.
8) View Aggregated Cookie Summary Report
Export an aggregated summary of cookies discovered by clicking âReports > Cookies > Cookie Summaryâ.
This shows an aggregated view of unique cookies discovered during a crawl, considering their name, domain, expiry, secure and HttpOnly values. The number of URLs each unique cookie was issued on will also be displayed. The cookie value itself is discounted in this aggregation (as they are unique!).
âď¸How To Calculate Keyword Density
Purpose: The purpose of keyword density calculation is to determine the prominence of a specific keyword or phrase within a given text or webpage. Keyword density was historically used as a metric to gauge the relevance and importance of a keyword within the content. However, it is important to note that keyword density is not as significant a factor in search engine rankings as it once was.
While keyword density is still considered by some as a basic SEO (Search Engine Optimization) factor, it is generally recommended to focus on creating high-quality, relevant content that is valuable to users, rather than obsessing over keyword density. It is important to strike a balance between using keywords naturally and ensuring that the content is readable and provides a good user experience.
âď¸Keyword Density Formula in Classic Way:
Keyword Density = ( KR / ( TW – ( KR x ( NWK – 1 ) ) ) ) x 100
KR = how many times key-phrases are repeated
NWK = number of words in key-phrases
TW = total words in the analysed text
Number of Key Phrases are Repeated:
Here the keyword âashwagandhaâs anti-inflammatory propertiesâ has repeated for 8 times
So, Number of Key Phrases are Repeated: 8
Number Of words In Key-phrases:
Here 4 words are present in the keyword
So, Number Of words In Key-phrases: 4
Total Words In The Analysed Text:
Here the word number of the web page needs to be counted.
The word number of the blog is 1187.
So, Total Words In The Analysed Text: 1187
Calculation Of Keyword Density:
Keyword Density = ( KR / ( TW – ( KR x ( NWK – 1 ) ) ) ) x 100
KR = 8
NWK = 4
TW = 1187
So,
( 8 / ( 1187 – ( 8 x ( 4 – 1 ) ) ) ) x 100
=( 8 / ( 1187 – ( 8 x 3 ) ) ) x 100
=( 8 / ( 1187 – 24 ) ) x 100
=( 8 / 1163) x 100
=0.687876 ~ 0.7
So, the Keyword density is 0.7(approx)
The ideal score are as follows:
- If the keyword density is between 0.5 â 1.5 = Good
- If the keyword density is 1.5 â 2 = Need To reduce keyword numbers
- If the keyword density is >2 = Keyword Stuffing
Now let us compare keyword density:
The score for this blog is 0.7(approx) which is within the zone of 0.5 â 1.5.Hence the keyword density of this current blog is 0.7, so it is Good.