Method Calls
setPageType
setpagetype method // setpagetype method window\ monetateq push(\[ "setpagetype", "idstring" ]); the setpagetype method sends to monetate the page type for a page that a site visitor is viewing this information allows you to limit actions to specific page types when you add action conditions to web experiences and are an alternative to manual url targeting you can use the setpagetype method on all page types of your site for example, if you want to display a hero banner only on your site's home page, then you must consider all of the following urls http //example com http //example com/ https //example com https //example com/ http //www example com http //www example com/ https //www example com https //www example com/ by defining a page type rather than using a target for all of the possible urls, you can reliably target visitors with pagetype=main you can pass any string value for page type, but monetate recommends using a single lowercase word as the value because the values are then easier to remember do not include whitespaces in a page type value refer to the following sections in baseline api call matrix for recommended page types baseline api call matrix baseline api call matrix baseline api call matrix baseline api call matrix baseline api call matrix you can use setpagetype with the addcategories method this approach may be useful if you want to target site visitors viewing the shirts category on a product listing page with a special offer monetate inspector view this screenshot shows the components tab of the monetate inspector browser plug in the page type row indicates that the setpagetype method is passing the value main the components tab of monetate inspector, with main as the page type value this code example contains the method in use that results in the monetate inspector results shown in the previous screenshot setpagetype example // setpagetype example window\ monetateq = window\ monetateq || \[]; window\ monetateq push(\[ "setpagetype", "main" ]); window\ monetateq push(\[ "trackdata" ]);