brightonseo - how to use xpath with ecommerce websites

41
Janet Plumpton MISSGUIDED How to use XPath with e-commerce Websites @PlumJans

Upload: janet-plumpton

Post on 21-Apr-2017

667 views

Category:

Marketing


0 download

TRANSCRIPT

Page 1: BrightonSEO - How to use XPath with eCommerce Websites

Janet PlumptonMISSGUIDED

How to use XPath with e-commerce Websites @PlumJans

Page 2: BrightonSEO - How to use XPath with eCommerce Websites

make the

most from

website

code for

e-commerceSEO

#brightonSEO@PlumJans https://www.slideshare.net/JanetPlumpton

Page 3: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

XPath = XML

Path Language

the easy way to pluck data

contained in HTML pages

Page 4: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

what does it look like?

//@href

//H2

//span[@itemprop=’ratingValue’]

Page 5: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

a few

standard uses for XPath

extraction

Page 6: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

extracting schema code

58 reviews

Page 7: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

scraping product SKUs

Product number: A2502222

Product number: DE911161

Product number: R9335328

Product number: A2502826

Product number: DD910086

Page 8: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

exporting specific page copy

CATEGORY

COPY

PRODUCT

COPY

Page 9: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

backlink auditing

Page 10: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

monitoring social activity

Page 11: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

scraping dates from blog posts

BLOG POST VISITS YEAR

http://www.missguided.co.uk/blog/fashion/blog-six 267 2017http://www.missguided.co.uk/blog/fashion/blog-two 146 2012http://www.missguided.co.uk/blog/fashion/blog-four 682 2015http://www.missguided.co.uk/blog/fashion/blog-three 214 2015http://www.missguided.co.uk/blog/fashion/blog-five 16 2016http://www.missguided.co.uk/blog/fashion/blog-one 86 2011

Page 12: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

the very

useful

tool kit

Page 13: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

the very

useful

tool kit

Page 14: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROGthe very

useful

tool kit

Page 15: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

INSPECT

ELEMENTthe very

useful

tool kit

Page 16: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

SCRAPER

EXTENSION

INSPECT

ELEMENTthe very

useful

tool kit

Page 17: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

SCRAPER

EXTENSION

INSPECT

ELEMENT

GOOGLE

SHEETS

the very

useful

tool kit

Page 18: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

If you are new

to XPath…

Page 19: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

…simply open a Google Sheet

Data XPath

Page

Title=ImportXML("URL","//title[1]")

Meta

Description=ImportXML("URL","//meta[@name='description']/@content")

H1

Heading=ImportXML("URL"; "//*[@name='h1'] ")

Page 20: BrightonSEO - How to use XPath with eCommerce Websites

@PlumJans

4 scraping tips for

e-commerce websites

time is money

#brightonSEO

Page 21: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

#1

Page 22: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

It can be a shock

to discover valuable traffic

going to empty categories

Page 23: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

products

per

category

mark-up

Page 24: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

//span[@class='js-cascade-label-max']

GOOGLE SHEETS

=IMPORTXML("URL", "//span[@class='js-cascade-label-max']")

SEO TOOLS FOR EXCEL

=XPathOnURL("URL", "//span[@class='js-cascade-label-max']")

Page 25: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

couple this data up

with traffic per URL

Page 26: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

0

200

400

600

800

1,000

1,200

1,400

1,600

1,800

2,000

0

5,000

10,000

15,000

20,000

25,000

30,000

35,000

40,000

45,000

A B C D E F G H I J K

Traffic and Styles per Category

Organic Traffic Styles

Page 27: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

#2

Page 28: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

number of products in a site

search URL

Page 29: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

recreate search URLs in Excel

Search Terms Site Search URL String + Search Terms

red bodysuit domain.co.uk/search?q= red+bodysuit

white blazer dress domain.co.uk/search?q= white+blazer+dress

khaki bomber jackets domain.co.uk/search?q= khaki+bomber+jackets

export site searches from GA

Page 30: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

are you presenting fewer

products on landing pages?

yes or no?

Page 31: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

#3

Page 32: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

which on page elements

perform better?

compare metrics

Page 33: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

do product pages convert

better with videos?

Page 34: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

//*[@id="product-media"]/a[1]/text()

Address Videos

/premium-white-plunge-neck-zip-through-bodycon-dress play video

/silky-plunge-wrap-shift-dress-red play video

/black-floral-print-strappy-midi-dress play video

/peace-love-white-lace-high-neck-midi-dress play video

/sequin-snake-high-neck-bodycon-dress-animal play video

Page 35: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

pick and choose

what you want to scrape

apply your metrics

Page 36: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

#4

Page 37: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

out of stock products

are they getting lots of traffic?

Page 38: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

http://schema.org/OutOfStock

what code sets your

OOS pages apart?

“Product out of Stock”

find it

Page 39: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

apply average conversion rate(faint)

products coming back?

yes or no?

Page 40: BrightonSEO - How to use XPath with eCommerce Websites

#brightonSEO@PlumJans

and that’s it

Page 41: BrightonSEO - How to use XPath with eCommerce Websites

make your day to day

tasks easier

by understanding your

website code

@PlumJans #brightonSEOhttps://www.slideshare.net/JanetPlumpton