# 💡How to Create a Twitter Pixel:🤔

To create **Twitter (X) pixels,** you must first have an **X Ads account** at[ **ads.x.com**](https://ads.x.com)**.**

Click on **'Tools,'** then navigate to **'Events Manager.'**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf0EjGDHKBfo64J7bgvzy0hcp7Q-TLGFpUffWisGyZZhASIaczAaxLgYA1AjSN1qOrSdTEel7MKAg44R4LFZJ00atiBNLgQCdYmmS-ZtJKNEkRsZpmhGRBpgf02yQmBwZVHWXmyzQ?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

Click on **'Add Events.**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcxOEwE4uSIReYEtSz3WfIGmJZTbsrL0SyQt9_rLJ_5q_n8WSZuLTPvgUqm73P_Oji8uW9QpJzLFh8XgdmXGTBDma5ZpAAXUPS3WAto2fjVTzV4eqY2NXnumLLNDs6RX3668OlbeA?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

Enter the **event name** and select the **event type,** such as **'Purchase'** in this example. Then click on **Next.** <br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcEemRKwtK27FO7_OEg7uMxR3QUcl8NrcrCqWt3M02RoRdlAx0gYQapVjFy1GkS23tiRlc1PCrI1wxVvGcfTRvIJxpkjjqnlcREqhgBa_Uq9xwn1ZN99DQEV1NBBiiBUO2LUC0vIg?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

Select the event method **'Define event with code,'** then click **'Next.'**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcFnA1DtkQkkxhuuUCV3JaBGk_SBXgzc5UH99YUKMrB_bWzGDkY8GuOpPmRBS7tvgG7YTecG2GdS5hMuFret022PJiz8mLVFLsRZ-1EnFQl1N7ITQPOuTUSlSOeo3om1wm_cMNdAg?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

Check all the **boxes for each parameter,** then click **"Save."**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXckZIXiY7UzDmv85n_44aKlOwiFdZYHY0EY03Rya9c5690GL_voxSEe-tGoMSihLjY8tzPi_j-5NINKr1boxbTWNk37FckJgruMrhb95zeszrzudfUyGbP6pG_YqVJ0Zldlp9IidA?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

**Congratulations🥳!** The **Purchase event** has been successfully created for your **Twitter Pixel**. The event status will initially be **'Inactive,'** but once activities are performed on your website, it will change to **'Active.'**\
\
Similarly, you can create **different events** using the **same process.**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc0MEeBpFeZrqrFoPpE-NbnFMZj2rh5zCDJcdIXjapCowrTiWS5IiRHw3vWPL5NL0N5tRyXIs3j5U7VRGsIWdVzJZSHtav6K0iOojQhOzkr5EpCVf48FbGDmCfOJ0At4Bb6ZoVL?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

From here, you can copy the **Pixel ID** and **Event IDs** and pass them to the **Infinite Pixel app.**<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfZT7RLGvqhJwL7DHkPNxvpYb7MwZPw3xsgm4GctXG_uTVsR1MVjc6V9IzfU9clO1gj47upEGHwAg5DOf8d-IfLjlZwGdrlYsMJMJuxnpd3ZVZc65Al5wegDChcrLiiYzn-R-yY1g?key=Ym4SYMYC7EBs5tAPHGOE2QR-" alt=""><figcaption></figcaption></figure>

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infinite-pixel-tracking.gitbook.io/infinite-pixel-tracking/twitter-pixel/how-to-create-a-twitter-pixel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
