Skip to main content

Google Analytics

Wendy avatar
Written by Wendy
Updated yesterday

If you prefer, you can check out this information in video format.

Integrating Google Analytics with Lantern’s Advanced Analytics gives you valuable insights into your quiz performance. This guide will walk you through the steps to set up Google Analytics for your quizzes in Lantern, from creating a Google Analytics property to tracking real-time events.

Step 1: Navigate to Advanced Analytics in Lantern

  1. Log in to Lantern and navigate to the Advanced Analytics section.

    Image showing Lantern’s Advanced Analytics panel in the Shopify admin with the 'Google Analytics' and 'Lantern Events' cards.

  2. In the Google Analytics tab, click on Set up Google Analytics.

    Image showing Lantern’s Google Analytics card with a red arrow pointing to the 'Set up Google Analytics' button.

  3. Identify the quiz you want to set up. For this example, we'll be using a quiz called Find your perfect pet food - LIVE

    Image showing the Google Analytics setup interface in Lantern’s Advanced Analytics panel with a quiz titled 'Find your perfect pet food – LIVE' highlighted and the 'Save and Finish Setup' button visible.

  4. To easily access the quiz URL, go to the Quizzes tab, open the the Publish page so you can easily copy the full URL of the quiz. You will need this URL later.

    Image showing the quiz builder 'Publish' step with the 'Option 2: Standalone link' section and the quiz URL displayed with the 'Copy Quiz URL' button highlighted.

Step 2: Create a New Google Analytics Property

  1. Log in to your Google Analytics account.

  2. Navigate to the Admin section by clicking on the gear icon in the bottom left corner.

    Image showing the Google Analytics Admin screen with a red arrow pointing to the gear icon labeled 'Admin' in the bottom-left corner.

  3. Under Property, click the Create Property button to set up a new property for your quiz.

    Image showing the expanded '+ Create' menu in the Google Analytics Admin panel with the 'Property' option highlighted.

  4. Name your property—include the name of your store (e.g., Lantern Pet Shop) and the quiz identifier (e.g., Find your perfect pet food). This helps you easily identify the quiz later.

    Image showing the 'Create a property' form in Google Analytics with the Property name field filled out as 'Lantern Pet Shop Find your perfect pet food'.

  5. Choose your reporting time zone and currency, provide your business details, and select your business objectives.

  6. Click Next to proceed to the Data Collection step.

Step 3: Obtain the Google Tag ID

  1. In the Data Collection step, select the platform type as Web.

    Image showing the 'Data collection' step in Google Analytics with 'Web' selected as the platform type.

  2. You’ll be prompted to provide your website URL. Important: Enter the full URL of your quiz that you copied earlier from Lantern, without the "https://" prefix.

    Image showing the web stream setup form in Google Analytics with the quiz URL entered in the Website URL field.

  3. Give your stream a descriptive name, such as Lantern Quiz Find Your Perfect Pet Food, to easily identify it in the future.

  4. Click Create and Continue.

    Image showing the 'Stream name' entered and a red arrow pointing to the 'Create & continue' button in the top-right corner.

Step 4: Set Up a Google Tag

  1. Click the arrow on the right-hand side of the stream you just created, which will open a pop-up labeled Set up a Google Tag.

    Image showing the 'Set up a Google tag' screen in Google Analytics with a red arrow pointing to the 'Show more options' link.

  2. You’ll see several methods to install the Google Tag. For this guide, we will use the Install with a CMS or Website Builder option.

    Image showing the Google tag setup options with 'Install with a CMS or website builder' selected and the 'Next' button highlighted.

  3. Select Shopify as your platform.

    Image showing the platform selection screen with 'Shopify' highlighted as the selected CMS for Google tag installation.

Step 5: Copy and Paste the Google Tag in Lantern

  1. Copy the Google Tag ID to your clipboard.

    Image showing the Google Tag ID displayed in Google Analytics with a red arrow pointing to the copy icon next to the tag.

  2. Go back to the Advanced Analytics panel in Lantern and paste the Google Tag ID into the input box next to the relevant quiz (e.g., Find your perfect pet food - LIVE).

  3. Click Save to finish the setup. Your quiz does not need to be republished; everything is handled from the Advanced Analytics panel.

    Image showing Lantern’s Advanced Analytics panel with the Google Tag ID field filled and a red arrow pointing to the 'Save & Finish Setup' button.

Step6: Test the Setup in Google Analytics

  1. Return to Google Analytics and navigate to the Installation Instructions page where you obtained the Google Tag.

  2. Scroll to the bottom of the page to the Test Your Website section and click Scan.

  3. A green confirmation tick should appear, confirming that the tag is successfully installed.

    Image showing the Google Analytics 'Test your website' section with the quiz URL and a green checkmark indicating successful tag detection.

View Real-Time Data in Google Analytics

Once the setup is complete, you can begin tracking your quiz events in real time within Google Analytics. Start by navigating back to the Home page in your Google Analytics account. From the drop-down menu, select the property you’ve just set up for your quiz (for example, Lantern Pet Shop Find your perfect pet food). This will allow you to monitor real-time events as users interact with your quiz.

Image showing the property selection dropdown in Google Analytics with the property name 'Lantern Pet Shop Find your perfect pet food' highlighted.

To track these events, go to the View Real-Time section. Here, you’ll see event counts by event name, such as when a welcome screen is loaded, an email page is submitted, or the results page is displayed.

Image showing the Realtime dashboard in Google Analytics with 1 active user and events such as 'form_start', 'submit_answer', and 'load_question_page' tracked.

You can also explore various custom properties that are sent from Lantern to Google Analytics, including the Lantern session ID, store ID, and page title, along with all the relevant custom events triggered by users as they navigate through your quiz.

For a complete list of all the available events and properties that you can use to create custom dimension and reports please check out the following article.

That’s all it takes to set up Google Analytics in Lantern! By simply creating a property, obtaining your Google Tag, and linking it to your quiz, you’ll be able to track all quiz interactions, including custom events and properties, directly in Google Analytics. This setup provides invaluable insights into user behavior, helping you optimize your quizzes for better performance and conversions.

Did this answer your question?