Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,15 @@ cronitor_analytics: # cronitor RUM analytics site ID (format: XXXXXXXXX)
pirsch_analytics: # your Pirsch analytics site ID (length 32 characters)
openpanel_analytics: # your Openpanel analytics client ID (format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)

# Visitor map widget. Uses the ClustrMaps script generated for this site
# to show a live world map with visitor locations and aggregate counts.
# Use a numeric width: ClustrMaps' automatic width (`w=a`) can get stuck
# on "loading data..." when embedded inside responsive/card layouts.
# Visitor map widget. Uses the ClustrMaps CDN embed pattern that works on
# static/GitHub Pages sites: `cl`, `w`, `t`, then `d`.
visitor_map:
enabled: true
provider: clustrmaps
clustrmaps_id: Ml1a9S8Mi1zsosnWVfkcW_owdoMdIsMr9cdcWgLWlx4
dot_color: ffffff
width: 320
width: 300
title_style: tt

google_site_verification: # your google-site-verification ID (Google Search Console)
bing_site_verification: # out your bing-site-verification ID (Bing Webmaster)
Expand Down
6 changes: 4 additions & 2 deletions _includes/visitor_map.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{% assign provider = visitor_map.provider | default: 'clustrmaps' %}
{% assign clustrmaps_id = visitor_map.clustrmaps_id | strip %}
{% assign dot_color = visitor_map.dot_color | default: 'ff3b30' | remove: '#' %}
{% assign map_width = visitor_map.width | default: 320 %}
{% assign map_width = visitor_map.width | default: 300 %}
{% assign map_title = visitor_map.title_style | default: 'tt' %}
{% assign map_width_string = map_width | append: '' %}
{% assign map_widget_style = '' %}
{% unless map_width_string == 'a' %}
Expand All @@ -22,6 +23,7 @@
</p>

<div
id="clustrmaps-widget"
class="visitor-map-widget"
{% if map_widget_style != blank %}
style="{{ map_widget_style }}"
Expand All @@ -31,7 +33,7 @@
<script
type="text/javascript"
id="clustrmaps"
src="https://clustrmaps.com/map_v2.js?d={{ clustrmaps_id }}&cl={{ dot_color }}&w={{ map_width }}"
src="https://cdn.clustrmaps.com/map_v2.js?cl={{ dot_color }}&w={{ map_width }}&t={{ map_title }}&d={{ clustrmaps_id }}"
></script>
{% else %}
<div class="visitor-map-placeholder">
Expand Down
Loading