Are you doing on page optimization of your website? If yes, so I think meta tags optimization is on top of your task list. To optimize meta tags, first you need to know what meta tags are present in the targeted web pages.
To do this, you can use Screaming Frog or other any software. But what if you haven’t this tool or you want to extract metadata of few selected URLs. On that time, you can use Google Sheets to extract page title and meta description of your targeted pages.
Follow below mentioned steps to extract meta tags from a website using Google Sheets:
- Create a new Google spreadsheet by entering sheets.new in the URL bar.
- After creating a spreadsheet, put down your URL list in a sheet, column A.
- Now enter the =IMPORTXML() formula in the second column.
=IMPORTXML(URL of the page, xpath_query)
- This formula requires two parameters, the first is URL, from where you want to extract data. In the second parameter, you have to enter XPATH of your webpage element. For example, you can enter “//h1” to extract the H1 of your targeted page.
=IMPORTXML("URL of the Page", "//h1")
- To extract page title of your targeted web page, enter this formula
- To extract meta description of your targeted web page, enter this formula
- After entering this both formulas in B and C column, now you can drag it down to extract data of all URLs.
Now you understand how to extract meta tags, if you want to rewrite your meta tags and optimize for the SEO, you should use our meta description length checker that lets you check the character & pixel length of a page title & meta description. By using our tool, you can optimize your meta tags and get outstanding results in the SEO.
I hope you understand IMPORTXML formula, if you have any doubt, so you should check out this IMPORTXML formula guide.
You can also make a copy of Google Sheet by clicking on below button. In this sheet I have shared the examples.
He is fond of digital marketing skills and loves to do creative things in a digital planet.