Guide 151 · Events · GA4 + Tag Manager
Track shares with the recommended share event: method, content_type, item_id, and the GA4 Event tag
A share button that does nothing in GA4 is a dead end: the site never learns which content travels or which channel carries it. The share event is a recommended event for every property, with three prescribed parameters — method, content_type, and item_id — and this guide builds it as a GA4 Event tag that fires on the share action.
After the tag is published, a test share shows in DebugView as a share event with method, content_type, and item_id all set, and the Realtime report lists it under Event count by Event name within minutes.
Download the container fragment: the share event container fragment (JSON) (3998 bytes, MD5 73931e30d5d8aa3fd9f022d191aa1be3). It holds one GA4 Event tag named GA4 - share, the Custom Event trigger that fires when the data layer event equals share, and the three data layer variables for method, content_type, and item_id. The Measurement ID is left as G-XXXXXXXXXX for you to replace. Import it from Admin, then Import Container, choosing Merge if the container already has tags.
What you need
- The Google tag already installed through Tag Manager. This guide adds one event tag beside it.
- A share action your site can signal. The push runs when the visitor completes the share — the share dialog opens or the link is copied — not when the button is merely shown.
- Three values per share. Google's prescribed parameters for
sharearemethod(the channel, such asFacebookorCopy link),content_type(the kind of content, such asarticle), anditem_id(the identifier of the content shared).
The worked example
The test below is six shares of one article across three channels. The number that decides which channel works is the split: half the shares went through copy link.
| Channel (method) | Shares |
|---|---|
| Copy link | 3 |
| 2 | |
| 1 | |
| Total shares | 6 |
| Copy link share | 3 of 6 (50.00%) |
Those figures were recomputed here before publication: 3 plus 2 plus 1 is 6 shares; 3 divided by 6 is 0.5, so copy link is 50.00% of the shares. The data layer push that carries one of those shares is the standard form:
dataLayer.push({
event: "share",
method: "Copy link",
content_type: "article",
item_id: "guide-0142"
});
The trace
- Push the share to the data layer on the action. When the share completes, run
dataLayer.push({ event: "share", method: "Copy link", content_type: "article", item_id: "guide-0142" }), with each value set to the real one. The event name isshare, exactly as Google spells it, and the parameter names aremethod,content_type, anditem_id. - Create the three data layer variables. In Tag Manager, go to Variables, then in User-Defined Variables create one Data Layer Variable per parameter:
DLV - methodformethod,DLV - content_typeforcontent_type, andDLV - item_idforitem_id. If the login or sign_up guide already createdDLV - method, reuse it; do not create a second one with the same name. - Add the GA4 Event tag. Go to Tags, then click New. Name it
GA4 - share. In Tag Configuration, choose tag type Google Analytics: GA4 Event. Enter your Measurement ID. In Event Name, entershare. Under Event Parameters, add three rows:methodwith{{DLV - method}},content_typewith{{DLV - content_type}}, anditem_idwith{{DLV - item_id}}. - Set the trigger. In Triggering, click the trigger box and choose New, then choose trigger type Custom Event. Set Event Name to
shareand choose All Custom Events. Click Save, then Save the tag. - Check it in Preview and DebugView. Click Preview, enter the site URL, and click Connect. Share the article with copy link. In Tag Assistant, the
shareevent must appear in the left panel with the tag under Tags Fired. Then open DebugView (Admin, then Data display, then DebugView) and confirm theshareevent shows with all three parameters set. - Publish it as a version. Click Submit at the top right, select Publish and Create Version, name the version, and click Publish.
Dead ends
DEAD END — THE TAG FIRES WHEN THE BUTTON IS SHOWN. A trigger on the share button appearing counts every page view as a share. The push belongs on the completed action: the dialog opened, the link copied, the channel chosen.
DEAD END — METHOD TYPED DIFFERENTLY EACH TIME. Copy link, copy_link, and Copy Link are three rows in the report for one channel. Pick one spelling per channel and use it everywhere; the same rule holds for content_type.
DEAD END — ITEM_ID IS THE PAGE TITLE. Titles change when a page is edited, and a changed title splits one article's shares across two rows. The item_id is a stable identifier — the article slug or the database ID — that survives an edit.
End state
One tag, one trigger, three parameters. A share shows in DebugView within a minute of the test, in Realtime within minutes of publishing, and in the Events report within 24 hours, with the channel split visible per row and the content split visible per item_id. Register item_id as an event-scoped custom dimension if you want to break the Events report down by article — the custom dimensions guide covers that step.
Sources
- Analytics Help — [GA4] Recommended events — share is a recommended event for all properties; it is sent when a user shares content
- Google Analytics developer documentation — GA4 event reference — the share event and its prescribed parameters, method, content_type, and item_id
- Tag Manager Help — Set up Google Analytics events in Tag Manager — the GA4 Event tag, the Measurement ID, the event name, the trigger, and Preview verification
- Analytics Help — Monitor events in DebugView — Admin, then Data display, then DebugView
Checked 11 November 2026. The click paths above are the ones in Google's help and developer pages, opened 11 November 2026. No step in this guide was run inside a live Analytics property or a live Tag Manager container, because both need a Google sign-in and this site does not sign in as anyone. What was run: the container fragment was validated structurally in Python 3.12.3 — export format version 2, unique IDs, the tag's firing trigger resolves to the Custom Event trigger in the file, and all three data layer variable references exist as variables — and the worked example was recomputed: 3 + 2 + 1 = 6 shares; 3 / 6 = 50.00% by copy link. Google moves menu items without warning; if a path on this page no longer matches, the linked help page is the current map.