How to get the Shopify object from Thank You page in Web Pixels?

My goal is to check if I am on the Thank You page. If yes, I want to add a div somewhere in here that contains some information about the order. I have a few questions:

  1. Should my checking if I am on Thank you page suffice? I am almost sure that it is not so I’m hoping to get the Shopify object to ensure my Thank You page check.

  2. Where can I see the list of analytics events that I can subscribe to?

See code below:

import { register } from '@shopify/web-pixels-extension'

register(({ configuration, analytics, browser, init }) => {
  const { window } = init.context
  console.log(window.Shopify) // This returns undefined

  // Subscribe to Page Viewed event
  analytics.subscribe('page_viewed', async (event) => {

    // Check if customer is on Thank You page
    if (
      event.context.document.title.startsWith('Thank you')
    ) {
      console.log('I am on Thank You page')

      const sectionContent = document.querySelector('.section__content')
      const secondContentBox = sectionContent.querySelector(
        '.content-box:nth-child(2)'
      )
      const newDiv = document.createElement('div')
      newDiv.innerHTML = `I WANT TO INSERT SOMETHING`
      sectionContent.insertBefore(newDiv, secondContentBox)
    }
  })
})
 

Any solution to this? I’m trying to convert an “Additional script”, which runs on the Thank You Page, to a Web Pixel

@cloder_1 I had another question related to this: How To Add An HTML Block In Thank You Page Of Shopify Using Web Pixels?, the suggestion was to use Checkout UI Extensions. However, what I ended up doing was use an App Embed Block. That allows you to have a reference to a javascript that runs on the shop.