X (formerly Twitter) connects to a WordPress site through the X Pixel and Conversions API for ad measurement, and through X Card and Open Graph meta tags that control how pages look when shared on X.
Support
This is for teams advertising or sharing content on X (formerly Twitter) who need it connected to their WordPress site correctly. I handle the measurement and the share previews.
-
X Pixel setup: Add the X Pixel through Google Tag Manager and map your funnel to X standard events.
-
Conversions API: Send server-side conversion events to X from your own gateway alongside the pixel.
-
Share preview fixes: Debug X Card images when an SEO plugin supplies the wrong image for shared links.
-
Card and Open Graph tags: Set page-specific titles, descriptions and share images so links look right when posted.
-
Tag cleanup: Remove manually coded Twitter Card tags that conflict with theme or plugin output.
Experience
Cred.ai (consumer fintech: banking app and credit card). Starting in February 2026 I implemented X conversion measurement for Cred.ai's advertising work on X. I set up access to the X ads platform, read through X's documentation, and began implementing the Conversions API together with the pixel. The pixel went into the existing Google Tag Manager container, and I mapped Cred.ai's enrollment funnel to X standard events: site visits, enrollment visited (add to cart), enrollment started (checkout initiated), enrollment pending (lead), and enrollment completed (purchase), then confirmed each showed as active in X's events manager.
The server-side half runs through track.cred.ai, the event gateway I built for Cred.ai, which also delivers conversions to Meta, TikTok and Google Ads. I added X as a destination there rather than installing another vendor tag, applied for the developer and Ads API access X requires, and confirmed successful responses from the Conversions API for the custom events. After releasing the X events I reviewed Meta's events manager to make sure the change had not introduced problems on the other platform. Later in 2026 I went back and diagnosed problems with the server-side requests to X and with an enrollment event firing more than once per applicant, which is the kind of maintenance a multi-destination pipeline needs.
Paperless Parts (manufacturing quoting software). In 2024 I debugged X (Twitter) card images on their marketing site, where Yoast SEO was supplying the wrong image for shared links.
Chelsea Supplies (UK radiators and composite decking retailer). In 2026, when I built colour-specific ranking pages for composite decking, I extended the colour into the page title and meta description and into the matching Open Graph and Twitter titles and descriptions. I also set the Open Graph and Twitter share image and its alt text to the image of the matching colour, so a link to a specific colour looks like that colour when shared.
Saint-Gaudens Memorial (nonprofit preserving the sculptor's home and studios in New Hampshire). In 2026 I removed manually coded Twitter Card tags from the theme's header output.
Approach
There is no single "X integration" for WordPress. There are several separate paths, and they solve different problems.
X Pixel (browser-side measurement). The X Pixel is X's website tag. It merges the older Universal Website Tag and Single Event Tag into one product: base code goes on every page, and event code fires on specific actions such as a lead, checkout start, or purchase. On WordPress it can be pasted into a theme, loaded through Google Tag Manager, or installed with a plugin. I have used the Google Tag Manager route.
Conversions API (server-side measurement). The X Conversions API accepts conversion events from your own server through the Ads API (a POST to a measurement conversions endpoint tied to your pixel ID). Events can carry an X click ID (twclid) or a hashed email or phone number as identifiers, and a conversion ID that lets X deduplicate an event sent by both the browser pixel and the API. Access is not automatic: you need an X developer account and an app approved for Ads API access, plus a user access token for someone with ad manager or account admin rights on the ad account. X also publishes an official "X Ads Conversion API" tag template for server-side Google Tag Manager containers. On a WordPress build this is usually server code, a queue worker, or a gateway service that WordPress and other applications send events to, not something WordPress does by itself. I have built this path for a client.
Official WordPress plugin. X does not appear to maintain a general-purpose official WordPress plugin today. The older Twitter-built plugin for tweet and follow buttons dates from the early 2010s and it is not clearly maintained. The WordPress.org directory does list a plugin named "X Pixel" with the publisher shown as "X Ads". It installs the base pixel once you save a pixel ID, can send store events for WooCommerce, Easy Digital Downloads and WP eCommerce, and can send Conversion API events server-side with deduplication. It is a young plugin (version 0.4.x, around a hundred active installs when I checked), so I treat it as an option to evaluate, not a settled standard.
X Cards and Open Graph tags (sharing previews). When someone posts a link on X, X reads meta tags from the page head: twitter:card (usually summary_large_image), twitter:title, twitter:description, twitter:image, and falls back to Open Graph (og:) tags when the twitter: ones are missing. In WordPress these tags almost always come from an SEO plugin. Yoast SEO outputs twitter:card by default as summary_large_image, only emits twitter:title or twitter:description when they differ from the Open Graph values, and chooses the image from a priority list (a custom X image, then a custom Facebook image, then the featured image, then images in the content, then site-wide social defaults). Per-page overrides live in the editor sidebar. Other SEO plugins and theme code can also print these tags, which is where duplicates and wrong images come from. I have worked on this path for several clients.
Embeds (posts and timelines). WordPress core embeds X posts through oEmbed, using X's publish endpoint. In the core tree I checked (WordPress 6.9), the built-in provider patterns still match twitter.com URLs only, and a core Trac ticket about x.com URLs and mixed domains in embed output was still open in late 2025. Pasting a post URL generally works, but cached embeds, the x.com versus twitter.com domain split, and X's script loading make this the least predictable path.
Other paths that exist. Auto-posting plugins publish new WordPress posts to X using the X API. X's general API moved to pay-per-use pricing in 2026, and the Ads API is a separate approval. My work here has focused on the pixel and Conversions API rather than auto-posting or embed builds.
Benefits
Ad spend you can attribute. The X Pixel and Conversions API tell X which clicks turned into leads or purchases, so campaign optimization is based on real conversions instead of clicks. For a funnel like a financial sign-up, that is the difference between guessing and knowing.
Better data than the browser alone. Server-side events are not blocked by ad blockers or lost to browser restrictions, and they can report outcomes that happen later or inside an app. Sending the same event from both the pixel and the API with a shared deduplication key fills gaps without double counting.
Control over the stack. Because WordPress, Google Tag Manager and a gateway service are all things you can own, you can send one clean event stream to X and to every other ad platform instead of maintaining separate tags for each.
Share links that look intentional. Correct card tags put the right title, description and image in front of followers. On a store with many similar pages, per-page share images and titles make links to different products or variants distinguishable in the feed.
Fewer surprises from the SEO plugin. Once the card tags are in one place (the SEO plugin, not hand-coded theme markup), content editors can change social previews per page without a developer.
Low cost of entry. The X Pixel and card tags are free to use. Ad spend is the main cost, and the Ads API access needed for server-side events is a separate approval from X, not a WordPress cost.
Fit
A good fit
-
You run or plan paid campaigns on X and need conversions reported back to the platform.
-
Your real conversion happens off the WordPress site (an app, a separate sign-up domain, a CRM), so browser tags alone cannot see it.
-
Your audience is active on X and you want links posted there to look right.
A better fit elsewhere
-
If you only need to post to X, a scheduling tool or an auto-post plugin is enough. You do not need the pixel.
-
If your paid spend is on Google, Meta or LinkedIn, set those up first. X measurement is worth the effort when X is an actual channel.
-
If you only need a share image, set the Open Graph tags well and let X fall back to them. Add twitter:* tags only when you need X to differ.
-
For sites that need a live feed of posts, weigh a plugin or static quotation against the embed script. Embeds add third-party JavaScript and can break when X changes endpoints.
Common pitfalls
-
Duplicate or conflicting card tags when an SEO plugin and hand-coded theme markup both print them.
-
The wrong image appearing in shares because the SEO plugin's fallback order chose something other than the intended image. Check the page source for twitter:image and og:image.
-
Cards that do not refresh after a fix, because X caches link previews. Re-test with a new URL parameter or wait.
-
Sending the same conversion from the browser and the server without a shared deduplication key, which inflates counts.
-
Treating pixel and API as a one-time setup. Events can silently duplicate or fail after a deploy, so they need monitoring.
Overview
Working with WordPress and X provides ad measurement and clean share previews when correctly implemented and integrated. X is the social network and advertising platform formerly known as Twitter, run by X Corp. A lot of the web still uses the old name in twitter.com URLs, Twitter Card tags and twitter:* meta properties. For WordPress it matters for ad measurement (the X Pixel and Conversions API), link previews (X Cards) and embedded posts.
FAQ
Answers to the most common questions I see asked by business owners,
CMOs and CTOs about X (Twitter) integrations with WordPress.
- Is Twitter the same as X?
-
Yes. X is the new name for Twitter. Much of the web tooling still uses the old name, so you will see "Twitter Cards", twitter:* meta tags, and twitter.com in embed code. Both names refer to the same platform.
- Does WordPress have an official X plugin?
-
Not a general one from X itself. The WordPress.org directory lists a plugin named "X Pixel" published under the name "X Ads", which installs the X Pixel and can send Conversion API events, but it is new and has few installs. Many sites instead add the pixel through Google Tag Manager or custom code, which gives more control.
- What is the difference between the X Pixel and the Conversions API?
-
The pixel runs in the visitor's browser and reports actions as they happen on the page. The Conversions API sends events from your server, so it works when browser tracking is blocked or when the conversion happens elsewhere. X recommends using both together and passing the same deduplication key so each conversion is counted once.
- Can I add the X Pixel with Google Tag Manager on WordPress?
-
Yes. Load the base code on all pages, then fire event tags from your data layer or triggers for actions like sign-up or purchase. I have set this up for a client and confirmed events show as active in X's events manager. For server-side containers, X publishes an official Conversion API tag template.
- What do I need to use the X Conversions API?
-
You need an X developer account, an app approved for Ads API access, and an access token for a user with ad manager or account admin rights on the ad account. At least one identifier is required with each event: the X click ID, or a hashed email or phone number. Plan for the approval step, since it is separate from creating a developer account.
- Why is the wrong image showing when I share my page on X?
- Do I still need twitter: meta tags if I have Open Graph tags?
- Do tweets embed properly in WordPress now that Twitter is X?
-
Mostly. Pasting a post URL into the editor still embeds it. The domain change has caused edge cases with x.com URLs, cached embeds, and mixed domains in the output, and WordPress core was still discussing improvements in late 2025. If an old embed breaks, re-pasting it usually refreshes the cache.
- Is the X Pixel free?
-
Yes, the pixel itself costs nothing. The expense is the advertising. Using the Conversions API additionally requires Ads API access, which X grants by application.
Kevin's ability as a web developer and consultant, along with his eagerness to add value, have been a tremendously valuable asset to our firm and investment companies. His in-depth knowledge of B2B technologies, and straight forward ideas and advice, have been a very strong asset for us.Scott Maxwell Founder and Managing Partner
OpenView Venture Partners
Need help integrating X (Twitter) and WordPress?
If you're integrating your WordPress website with X (Twitter) I can help. Schedule a free consultation on Google Meet, or contact me by email directly.
Additional Consulting Services
Custom integrations are one slice of a broader practice. I've spent 18+ years as a fractional engineer for marketing and product teams — designing, building, securing, and measuring WordPress platforms end to end.