brightonseo - how to use xpath with ecommerce websites

Post on 21-Apr-2017

667 Views

Category:

Marketing

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Janet PlumptonMISSGUIDED

How to use XPath with e-commerce Websites @PlumJans

make the

most from

website

code for

e-commerceSEO

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

#brightonSEO@PlumJans

XPath = XML

Path Language

the easy way to pluck data

contained in HTML pages

#brightonSEO@PlumJans

what does it look like?

//@href

//H2

//span[@itemprop=’ratingValue’]

#brightonSEO@PlumJans

a few

standard uses for XPath

extraction

#brightonSEO@PlumJans

extracting schema code

58 reviews

#brightonSEO@PlumJans

scraping product SKUs

Product number: A2502222

Product number: DE911161

Product number: R9335328

Product number: A2502826

Product number: DD910086

#brightonSEO@PlumJans

exporting specific page copy

CATEGORY

COPY

PRODUCT

COPY

#brightonSEO@PlumJans

backlink auditing

#brightonSEO@PlumJans

monitoring social activity

#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

#brightonSEO@PlumJans

the very

useful

tool kit

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

the very

useful

tool kit

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROGthe very

useful

tool kit

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

INSPECT

ELEMENTthe very

useful

tool kit

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

SCRAPER

EXTENSION

INSPECT

ELEMENTthe very

useful

tool kit

#brightonSEO@PlumJans

SEO TOOLS

FOR EXCEL

SCREAMING

FROG

SCRAPER

EXTENSION

INSPECT

ELEMENT

GOOGLE

SHEETS

the very

useful

tool kit

#brightonSEO@PlumJans

If you are new

to XPath…

#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'] ")

@PlumJans

4 scraping tips for

e-commerce websites

time is money

#brightonSEO

#brightonSEO@PlumJans

#1

#brightonSEO@PlumJans

It can be a shock

to discover valuable traffic

going to empty categories

#brightonSEO@PlumJans

products

per

category

mark-up

#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']")

#brightonSEO@PlumJans

couple this data up

with traffic per URL

#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

#brightonSEO@PlumJans

#2

#brightonSEO@PlumJans

number of products in a site

search URL

#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

#brightonSEO@PlumJans

are you presenting fewer

products on landing pages?

yes or no?

#brightonSEO@PlumJans

#3

#brightonSEO@PlumJans

which on page elements

perform better?

compare metrics

#brightonSEO@PlumJans

do product pages convert

better with videos?

#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

#brightonSEO@PlumJans

pick and choose

what you want to scrape

apply your metrics

#brightonSEO@PlumJans

#4

#brightonSEO@PlumJans

out of stock products

are they getting lots of traffic?

#brightonSEO@PlumJans

http://schema.org/OutOfStock

what code sets your

OOS pages apart?

“Product out of Stock”

find it

#brightonSEO@PlumJans

apply average conversion rate(faint)

products coming back?

yes or no?

#brightonSEO@PlumJans

and that’s it

make your day to day

tasks easier

by understanding your

website code

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

top related