Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class PageInfo.
Detailed page information.
Generated from protobuf messagegoogle.cloud.discoveryengine.v1.PageInfo
Namespace
Google \ Cloud \ DiscoveryEngine \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ pageview_id
string
A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. Thepageview_idproperty should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
↳ page_category
string
The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy:"pageCategory" : "Sales > 2017 Black Friday Deals". Required forview-category-pageevents. Other event types should not set this field. Otherwise, anINVALID_ARGUMENTerror is returned.
↳ uri
string
Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
↳ referrer_uri
string
The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty.
getPageviewId
A unique ID of a web page view.
This should be kept the same for all user events triggered from the same
pageview. For example, an item detail page view could trigger multiple
events as the user is browsing the page. Thepageview_idproperty should
be kept the same for all these events so that they can be grouped together
properly.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically.
Returns
Type
Description
string
setPageviewId
A unique ID of a web page view.
This should be kept the same for all user events triggered from the same
pageview. For example, an item detail page view could trigger multiple
events as the user is browsing the page. Thepageview_idproperty should
be kept the same for all these events so that they can be grouped together
properly.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPageCategory
The most specific category associated with a category page.
To represent full path of category, use '>' sign to separate different
hierarchies. If '>' is part of the category name, replace it with
other character(s).
Category pages include special pages such as sales or promotions. For
instance, a special sale page may have the category hierarchy:"pageCategory" : "Sales > 2017 Black Friday Deals".
Required forview-category-pageevents. Other event types should not set
this field. Otherwise, anINVALID_ARGUMENTerror is returned.
Returns
Type
Description
string
setPageCategory
The most specific category associated with a category page.
To represent full path of category, use '>' sign to separate different
hierarchies. If '>' is part of the category name, replace it with
other character(s).
Category pages include special pages such as sales or promotions. For
instance, a special sale page may have the category hierarchy:"pageCategory" : "Sales > 2017 Black Friday Deals".
Required forview-category-pageevents. Other event types should not set
this field. Otherwise, anINVALID_ARGUMENTerror is returned.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUri
Complete URL (window.location.href) of the user's current page.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically. Maximum length 5,000
characters.
Returns
Type
Description
string
setUri
Complete URL (window.location.href) of the user's current page.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically. Maximum length 5,000
characters.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getReferrerUri
The referrer URL of the current page.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically. However, some browser
privacy restrictions may cause this field to be empty.
Returns
Type
Description
string
setReferrerUri
The referrer URL of the current page.
When using the client side event reporting with JavaScript pixel and Google
Tag Manager, this value is filled in automatically. However, some browser
privacy restrictions may cause this field to be empty.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class PageInfo (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.PageInfo)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.PageInfo)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.PageInfo)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.PageInfo)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.PageInfo)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.PageInfo)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.PageInfo)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.PageInfo)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.PageInfo)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.PageInfo)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.PageInfo)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.PageInfo)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.PageInfo)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.PageInfo)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.PageInfo)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.PageInfo)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.PageInfo) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class PageInfo.\n\nDetailed page information.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.PageInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPageviewId\n\nA unique ID of a web page view.\n\nThis should be kept the same for all user events triggered from the same\npageview. For example, an item detail page view could trigger multiple\nevents as the user is browsing the page. The `pageview_id` property should\nbe kept the same for all these events so that they can be grouped together\nproperly.\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically.\n\n### setPageviewId\n\nA unique ID of a web page view.\n\nThis should be kept the same for all user events triggered from the same\npageview. For example, an item detail page view could trigger multiple\nevents as the user is browsing the page. The `pageview_id` property should\nbe kept the same for all these events so that they can be grouped together\nproperly.\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically.\n\n### getPageCategory\n\nThe most specific category associated with a category page.\n\nTo represent full path of category, use '\\\u003e' sign to separate different\nhierarchies. If '\\\u003e' is part of the category name, replace it with\nother character(s).\nCategory pages include special pages such as sales or promotions. For\ninstance, a special sale page may have the category hierarchy:\n`\"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\"`.\nRequired for `view-category-page` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### setPageCategory\n\nThe most specific category associated with a category page.\n\nTo represent full path of category, use '\\\u003e' sign to separate different\nhierarchies. If '\\\u003e' is part of the category name, replace it with\nother character(s).\nCategory pages include special pages such as sales or promotions. For\ninstance, a special sale page may have the category hierarchy:\n`\"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\"`.\nRequired for `view-category-page` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### getUri\n\nComplete URL (window.location.href) of the user's current page.\n\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically. Maximum length 5,000\ncharacters.\n\n### setUri\n\nComplete URL (window.location.href) of the user's current page.\n\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically. Maximum length 5,000\ncharacters.\n\n### getReferrerUri\n\nThe referrer URL of the current page.\n\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically. However, some browser\nprivacy restrictions may cause this field to be empty.\n\n### setReferrerUri\n\nThe referrer URL of the current page.\n\nWhen using the client side event reporting with JavaScript pixel and Google\nTag Manager, this value is filled in automatically. However, some browser\nprivacy restrictions may cause this field to be empty."]]