Analyzing User Behavior on an E-commerce Site

Understanding user behavior on an e-commerce site is crucial for optimizing user experience, improving engagement, and increasing conversions.

In this post, we will dive into foundational metrics that define user behavior using the Google Analytics Sample Dataset in BigQuery.

We will explore key metrics such as total visits, average page views, traffic source distribution, bounce rates, session durations, and engagement by device type and geographical location.

Prerequisites:

  • Access to Google Cloud Platform and BigQuery.

Exploring Foundational Metrics

Total Visits

The total number of visits to your e-commerce site is a fundamental metric that provides an overview of site traffic.

SELECT COUNT(DISTINCT visitId) AS total_visits
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`;

Average Page Views per Visit

Average page views per visit indicate how many pages users are viewing during a single session.

SQL
SELECT AVG(totals.pageviews) AS avg_pageviews_per_visit
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`;

Traffic Source Distribution

Understanding where your traffic is coming from can help you tailor marketing strategies and identify key referral sources.

SQL
SELECT trafficSource.source, COUNT(*) AS visit_count
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`
GROUP BY trafficSource.source
ORDER BY visit_count DESC;

Analyzing User Engagement Metrics

Bounce Rate

Bounce rate measures the percentage of sessions where users only view a single page before leaving the site. A high bounce rate may indicate that users are not finding what they’re looking for.

SQL
SELECT
  COUNTIF(totals.pageviews = 1) / COUNT(*) AS bounce_rate
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`;

Average Session Duration

Average session duration provides insights into how long users are spending on your site during a single session.

SQL
SELECT AVG(totals.timeOnSite) AS avg_session_duration
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`;

User Engagement by Device Type

Different devices may offer different user experiences. Analyzing engagement by device type helps identify how users interact with your site on various devices.

SQL
SELECT
  device.deviceCategory,
  AVG(totals.pageviews) AS avg_pageviews,
  AVG(totals.timeOnSite) AS avg_time_on_site
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`
GROUP BY device.deviceCategory;

User Engagement by Geographical Location

Geographical analysis of user engagement can help tailor content and marketing efforts to different regions.

SQL
SELECT
  geoNetwork.country,
  AVG(totals.pageviews) AS avg_pageviews,
  AVG(totals.timeOnSite) AS avg_time_on_site
FROM `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`
GROUP BY geoNetwork.country
ORDER BY avg_pageviews DESC
LIMIT 10;

You can find the complete code in my GitHub repository.

Results

Our analysis of the Google Analytics Sample Dataset yielded several key insights into user behavior on this e-commerce site:

Site Traffic and Page Views

The e-commerce site received 2,509 total visits on August 1, 2017. On average, users viewed 4.28 pages per visit. This suggests a moderate level of engagement, with visitors exploring multiple pages during their sessions.

Traffic Source Distribution

Following are the top 9 traffic sources.

1) Direct traffic is the most significant source of visits. This high volume indicates strong brand loyalty and user familiarity with the website.

Users are likely bookmarking the site, typing the URL directly into their browsers, or accessing the site via saved links. This suggests that the brand has a substantial user base that returns frequently.

2) YouTube is a critical referral source, contributing a significant number of visits. This indicates effective use of video marketing or promotions on YouTube.

It suggests that the site’s content or advertisements on YouTube are engaging enough to drive viewers to visit the site.

Enhancing video content and further promoting it on YouTube could potentially increase this traffic even more.

3) Visits from analytics.google.com imply that users are coming to the site through links within Google Analytics, possibly during analysis sessions or reporting.

This could include users reviewing site data or settings and then navigating to the actual site.

4) The ‘Partners’ category, though unspecified, indicates traffic from associated or partner websites. This suggests collaborations or affiliations with other sites, which can be an essential source of targeted traffic.

5) Traffic from DoubleClick for Advertisers shows that display ad campaigns are driving users to the site. Though the visit count is lower compared to other sources, it reflects the effectiveness of display advertising in attracting users. Optimizing ad campaigns and targeting could increase traffic from this source.

6) Visits from google.com indicate organic search traffic. This suggests that the site’s SEO strategies are effective, but there may be room for improvement. Enhancing keyword optimization and content relevance can boost organic search traffic further.

7) Traffic from sites.google.com likely comes from links within Google Sites or related services. This might be users navigating from related resources or content hosted on Google Sites.

8&9) Facebook and Quora, though lower in traffic, represent growth opportunities. Increasing engagement on these platforms through targeted content and active participation can attract more visitors.

SourceVisit Count
Direct2166
youtube.com180
analytics.google.com57
Partners52
DFA (DoubleClick for Advertisers)15
google.com12
sites.google.com8
facebook.com7
quora.com6

Bounce Rate

The site’s bounce rate is 48.6%, meaning nearly half of the visitors leave after viewing just one page. There may be room for improvement in initial user engagement or landing page optimization.

Session Duration

The average session duration is 325.05 seconds (about 5.4 minutes). This indicates that engaged users are spending a significant amount of time on the site, possibly browsing products or reading content.

Device Usage and Engagement

Desktop users show the highest engagement, with an average of 4.78 page views and 352.45 seconds spent on site.
Mobile users view fewer pages (3.22 on average) and spend less time (261.24 seconds).
Tablet users have the lowest engagement, with 3.12 page views and 194.86 seconds on site.

This data suggests that the desktop experience may be more comprehensive or user-friendly. There could be opportunities to improve the mobile and tablet experiences to increase engagement on these devices.

Geographical Engagement

The top 10 countries by average page views show some interesting patterns:
Iraq and Saudi Arabia lead with the highest average page views (15 and 11 respectively), suggesting high engagement from these markets.

Users from Finland, Iceland, and Venezuela spend significantly more time on the site compared to other countries, indicating deep engagement from these markets.

The United States, while having lower average page views (5.8), represents a significant portion of traffic and maintains above-average session duration (368.6 seconds).

These geographical insights can inform targeted marketing strategies and potential areas for localization or market expansion.

CountryAvg. PageviewsAvg. Time on Site (seconds)
Iraq15.0493.0
Saudi Arabia11.0495.5
Dominican Republic10.4333.2
Finland9.51145.0
Venezuela9.34379.0
Iceland9.01221.0
Thailand6.9108.0
United States5.8368.6
Norway5.6189.4
Serbia5.31031.5

Conclusion

The above analysis provides valuable insights into user behavior on the e-commerce site.

The moderate page views per visit and significant average session duration suggest that engaged users find value in the site’s content or products. However, the relatively high bounce rate indicates there’s room for improvement in initial user engagement.

The stark differences in engagement across devices highlight the need for a responsive, mobile-friendly design that provides a consistent experience across all platforms.

This is particularly important given the lower engagement rates for mobile and tablet users.

Geographically, while some smaller markets show high engagement, there’s potential to improve engagement in larger markets like the United States.

This could involve tailoring content or products to specific regional preferences or addressing any barriers to engagement in these markets.

Moving forward, these insights can guide efforts to optimize the user experience, refine marketing strategies, and ultimately drive conversions

Future analyses could delve deeper into specific user segments, analyze the customer journey, or investigate correlations between these metrics and actual purchase behavior.

RSS
Follow by Email
LinkedIn
LinkedIn
Share