Analytics

How to Set Up Elevar’s Integration for Google Pub/sub (with screenshots)

Get step-by-step instructions for connecting Elevar to Google Pub/sub and unify your data to make more informed decisions about your marketing campaigns.

How to Set Up Elevar’s Integration for Google Pub/sub (with screenshots)

Kayle Larkin

Head of Marketing

When data is stuck in siloes, marketing efficiency tanks, reporting is delayed, and optimization becomes guesswork. 

Fortunately, a solution exists to unify your data: Elevar’s integration for Google Pub/sub. 

With Elevar’s Pub/sub integration, you can send event data to your system in addition to your marketing destinations, allowing you to break your data out of silos and gain insights for better decision-making. 

This guide walks you through the steps to set up Elevar and Google Pub/sub so that your system logs all the events that come out of your store: 

Prerequisites for Connecting Google Pub/sub with Elevar 

Before completing the steps below, ensure that you have: 

Create a Google Pub/sub Topic

1. Navigate to Google Cloud and access the Pub/sub service.

  • Under the hamburger menu at the top left, select “Pub/Sub.” If this is not visible, select “View all products.”

    Screenshot from Google Cloud, March 2025.

2. Click “Create topic.”

3. Name your topic. As a best practice, the topic name should be clear and easy to recognize. For example, you might use “Elevar_pub_sub_topic.”

4. Uncheck “Add a default subscription.”

Screenshot from Google Cloud, March 2025.

5. Click “Create” to finalize your topic creation.

Set Up a Cloud Run Function

Once your topic is created, the next step is to set up a Cloud Run Function.

6. Select “TRIGGER CLOUD RUN FUNCTION.” Located in the top right corner of the topic creation page.

Screenshot from Google Cloud, March 2025.

7. Name your CLOUD RUN FUNCTION.

  • Best practice is for the function name to be similar to the name of your topic. If you named your topic “elevar_pubsub_topic,” then you might name your function “elevar_pubsub_function.”
Screenshot from Google Cloud, March 2025.

8. Scroll down to the “INDEX.JS” box below the “Source code” field.

Screenshot from Google Cloud, March 2025.

9. Within the “INDEX.JS” box, delete all code.

10. Replace existing code in the “INDEX.JS” box with the provided code snippet [available here].

11. Ensure the text in the “Entry point” field matches line 3 of your pasted code.

  • For example, if the “Entry point” field says “helloPubSub,” then that’s what you should also see in line 3 of your code.
  • If there’s a mismatch in names, correct it by updating line 3 of your code to match the “Entry point” field.

    Screenshot from Google Cloud, March 2025.

12. Click “Deploy Function” once the setup is correct.

Set Up Elevar Permissions in Pub/sub 

For Elevar to publish into your Google Cloud Project, you must set up permissions. 

Screenshot from Google Cloud, March 2025.

13. Use the hamburger menu in the top left to and select “IAM & Admin.” You may need to click on “View All Products” first.

14. Click “Grant Access.”

15. Enter the Elevar-provided email in the “New Principals” field.

16. Under the “Assign roles” field, search for and select the role “Pub/Sub Publisher.”

Screenshot from Google Cloud, March 2025.

17. Click “Save” to confirm these permissions.  

18. Take note of your project name and topic name in Google Cloud Pub/sub. You will need them for the next phase of setup. 

  • You can find your project name in the end of your project name’s URL after “?project=”

    Screenshot from Google Cloud, March 2025.
  • Use the hamburger menu to open Pub/Sub and find your topic name listed under “Topic ID.”

    Screenshot from Google Cloud, March 2025.

Connect Elevar with Google Pub/sub 

With your setup complete on the Google Cloud side, next is to connect Elevar with Google Pub/sub. 

19. Open the Elevar app and click “Add Destination.”  

20. Within the left-hand navigation, select “My Tracking,” and then “Add Destination” on the top right. 

21. Search for and select “Pub/sub,” then click “Get Started.”

  • You will see an “Action Required” notification. Because you already created a Google Cloud Project and Topic, click “Mark Complete.”

    Screenshot from Elevar App, March 2025.

22. Enter your Google Cloud Project name and Pub/sub topic name that you saved earlier in Step 18.

Screenshot from Elevar App, March 2025.

23. Follow the prompts to configure your setup as desired. 

  • Under the Events prompt, it’s recommended to choose “Use Best Practices.”
  • Find more information about configuring your setup here. 

24. Click “Go Live” once the configuration is complete.

Verify the Elevar Setup with Google Pub/sub 

To check that everything is set up correctly:  

25. Trigger an event on your eCommerce store to test, such as “Add to Cart.”

26. Return to Google Cloud to look for the event. 

27. Using the hamburger menu, go to “View All Products” and select “Cloud Run Functions.”

28. Find the function you created and click “Logs.”

  • Your test event should appear in the logs showing data associated with the event.

    Screenshot from Google Cloud, March 2025.

Never Miss Another Conversion 

Elevar provides a robust way to manage and leverage your data for better business insights. With over 50+ destinations, you can maximize the number of events you’re collecting across your marketing channels and send enriched data to your system. 

Ready to take the next step? Book a call with us to see how to improve the performance of your marketing campaigns with Elevar. 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like