A lightweight, modern, and flexible integration for embedding Spotify players (tracks and playlists) directly into your Shopify theme (e.g., Dawn) using native Shopify Metafields.
This integration allows store owners to tie products to specific songs (using track players) and collections to specific playlists (using playlist embeds).
- Flexible Input Parsing: Accepts full Spotify sharing URLs, URI strings, or clean Spotify IDs.
- Dynamic Collection Playlists: Embeds Spotify playlists on collection templates with custom fallbacks.
- Theme-Editor Friendly: Once code is added, placement and styling can be managed 100% via the Shopify Theme Customizer.
- Polished UX: Embedded widgets come with elegant hover state micro-animations and drop-shadow styling.
- snippets/spotify-track-player.liquid: Embedded track player for product pages.
- sections/spotify-collection-playlist.liquid: Full-width customizable section for collection playlists.
- Go to your Shopify Admin > Settings > Custom data.
- Click Products > Add definition.
- Set Name to
Spotify Track Identifier. - Set Namespace and key to
spotify.track_identifier. - Set Type to
Single line text. - Click Save.
- Click Collections > Add definition.
- Set Name to
Spotify Playlist Identifier. - Set Namespace and key to
spotify.playlist_identifier. - Set Type to
Single line text. - Click Save.
- Copy spotify-track-player.liquid into your theme's
snippets/folder. - Copy spotify-collection-playlist.liquid into your theme's
sections/folder.
- Go to Online Store > Themes and click Customize on your theme.
- Select Products > Default product in the top dropdown.
- Under the Product information section, click Add block and select Custom Liquid.
- Paste the following snippet:
(Change
{% render 'spotify-track-player', product: product, size: 'compact' %}size: 'compact'tosize: 'large'to show the full album artwork). - Drag the block to your desired location and click Save.
- In the Theme Customizer top dropdown, select Collections > Default collection.
- In the sidebar, click Add section and select Spotify Playlist Embed.
- Customize the title, description, heights, and fallback playlist URL (which displays if the collection metafield is empty).
- Click Save.