Download our free guide - 42 ways to improve your product page
Flying Spares Case Study by magic42

Flying Spares

International B2B Magento with 240k catalogue, Khaos Control Integration and digital marketing.
Find out more
Stone Computers Case Study by magic42

Stone Computers

Adobe Magento Commerce B2C, B2B portal and PunchOut sites and bespoke loan payment solution.
Find out more
Alan-Paine-Case-Study-Featured-Image

Alan Paine

Multisite, B2C migration from Magento to Shopify Plus with ERP integration.
Find out more
haws case study image (1)

Haws Watering Cans

B2C eCommerce strategy, UX improvements, AdWords and Klaviyo email marketing management.
Find out more
Alan-Paine-Case-Study-Featured-Image

Alan Paine

Multisite, B2C migration from Magento to Shopify Plus with ERP integration.
Find out more
Berry Flirt smoothie pouring into a glass

Berry Flirt

Fast moving B2C theme and bundling solution on Shopify
Find out more

Call Us

Speak to a Shopify expert:

0121 663 6360

Get in touch 
May 21, 2020

YouTube Videos on a Magento 2 Product Page - How to get a YouTube API Key

Encouraging visitors on your eCommerce store to engage with your products, while converting this enthusiasm into a sale is vital. There are many ways of achieving this, through informative copy and attractive imagery. One aspect that often is overlooked though is the power of video.

Videos may demonstrate the features of a product, how to guides on best uses or instructional demonstrations of installation. They provide confidence, while also providing a total audio and visual experience that can be your best engagement tool.

Embed YouTube videos on Magento 2

So how do you add a YouTube video to Magento 2… Let us show you how.

1 - Obtain a YouTube API key

The very first step is to get yourself a YouTube API key, which will give Magento the access it needs to access the data from YouTube to populate the video information and embed it within your product page.

  • Visit the Google API Library
  • Select ‘YouTube Data API v3’
  • Select ‘Enable’
  • Select ‘Create Credentials’ > ‘API Key’
  • Copy the text which displays your unique API key

2 - Adding your YouTube API key in Magento 2

Now let’s head back to your Magento store to enter the YouTube API key:

  • On the sidebar of Magento go to Stores > Settings > Configuration
  • Under ‘Catalog’ select ‘Catalog’
  • Under the ‘Product Videos’ area, paste your previously copied YouTube API key into the required field
  • Save

3 - Adding a YouTube video to a Magento 2 product page

Now to tell Magento to insert the video on to a Product page...

  • Visit the product page edit view you wish to add the video to
  • Go to the ‘Images and Videos’ section
  • Click ‘Add Video’
  • Enter the URL of the video you wish to embed
  • Click the ‘Get Video information’ button to fill in a lot of the details and customise as required
  • Save your product

All that is left is to check the frontend of the website to ensure your video has appeared.

Remember to clear your cache under ‘Cache Management’ for good measure if you find the video is not yet visible.

Embed YouTube videos on Magento 2

We are a Magento development agency with 20 years eCommerce experience; for any help or advice on migrating, updating or maintaining your Magento eCommerce site, contact our team today.

magic42 is unique in that it evolved from Mobile Fun, an award-winning online retailer with 20 years of experience, 27 international websites and a global distribution network managed from the heart of Birmingham.
Company No. 11572347 VAT No. 310 2436 61
© Copyright 2023 magic42 Limited - All Rights Reserved
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram