Segmentation in the API

Learn how to use the powerful segmentation feature available in Matomo (formerly Piwik). This page explains how to build the 'segment' parameter in your API requests. Segmentation makes it easy to request any Matomo report for a subset of your audience.

This page explains how to build and use the 'segment' API URL parameter, and you will find the list of all the supported visitor segments (country, entry page, keyword, returning visitor, etc.).

Segment Parameter in the API URL Request

Segmentation can be applied to most API functions. The segment parameter contains the definition of the segment you wish to filter your reports to.

For example, you can request the "Best Keywords" report processed for all visits where "Country is Germany AND Browser is Firefox" by doing the following request:

https://matomo.example.org/index.php
?token_auth=yourTokenHere
&format=xml
&date=2011-01-11
&period=week
&idSite=1
&module=API&method=Referrers.getKeywords
&segment=browserCode==FF;countryCode==DE

Example URL of top countries used by visits landing on the page: virtual-drums.com/: demo.matomo.org/?module=API&method=UserCountry.getCountry&idSite=3&date=yesterday&period=day&format=xml&filter_truncate=5&language=en&segment=entryPageUrl==http%3A%2F%2Fwww.virtual-drums.com%2F

Let's take a look at the segment string.

Segment operators

Operator Behavior Example
== Equals &segment=countryCode==IN Return results where the country is India
!= Not equals &segment=actions!=1 Return results where the number of actions (page views, downloads, etc.) is not 1
<= Less than or equal to &segment=actions<=4 Return results where the number of actions (page views, downloads, etc.) is 4 or less
< Less than &segment=visitServerHour<12 Return results where the Server time (hour) is before midday.
>= Greater than or equal to &segment=visitDuration>=600 Return results where visitors spent 10 minutes or more on the website.
> Greater than &segment=daysSinceLastVisit>1 Return results where visitors are coming back to the website 2 days or more after their previous visit.
=@ Contains &segment=referrerName=@piwik Return results where the Referer name (website domain or search engine name) contains the word "piwik".
!@ Does not contain &segment=referrerKeyword!@yourBrand Return results where the keyword used to access the website does not contain word "yourBrand".
=^ Starts with &segment=referrerKeyword=^yourBrand Return results where the keyword used to access the website starts with "yourBrand" (requires at least Matomo 2.15.1).
=$ Ends with &segment=referrerKeyword=$yourBrand Return results where the keyword used to access the website ends with "yourBrand" (requires at least Matomo 2.15.1).

Combine Segments with AND and OR expressions

You can combine several segments together with AND and OR logic.

OR operator is the , (comma) character, for example:

  • &segment=countryCode==US,countryCode==DE Country is either (United States OR Germany)

AND operator is the ; (semi-colon) character, for example:

  • &segment=visitorType==returning;countryCode==FR Returning visitors AND Country is France
  • &segment=referrerType==search;referrerKeyword!=Piwik Visitors from Search engines AND Keyword is not Matomo

Note that if you combine OR and AND operators, the OR operator will take precedence. For example, the following query &segment=referrerType==search;referrerKeyword==Piwik,referrerKeyword==analytics will select "Visitors from Search engines AND (Keyword is Matomo OR Keyword is analytics)"

List of segments

Dimensions

Visitors
browserName Browser
Example values: FireFox, Internet Explorer, Chrome, Safari, Opera etc.
browserCode Browser code
Example values: FF, IE, CH, SF, OP etc.
browserEngine Browser engine
Example values: Trident, WebKit, Presto, Gecko, Blink, etc.
browserVersion Browser version
Example values: 1.0, 8.0, etc.
deviceBrand Device brand
Example values: 2E, 3GNET, 3GO, 3Q, 4Good, 4ife, 5IVE, 7 Mobile, 10moons, 360, 8848, A&K, A1, A95X, Accent, Accesstyle, Ace, Acer, Acteck, actiMirror, Adronix, Advan, Advance, Advantage Air, AEEZO, AFFIX, AfriOne, AGM, AG Mobile, AIDATA, Ainol, Airis, Airness, AIRON, Airpha, Airtel, Airties, AIS, Aiuto, Aiwa, Akai, AKIRA, Alba, Alcatel, Alcor, ALDI NORD, ALDI SÜD, Alfawise, Aligator, AllCall, AllDocube, ALLINmobile, Allview, Allwinner, Alps, Altech UEC, Altice, Altimo, altron, Altus, AMA, Amazon, Amazon Basics, AMCV, AMGOO, Amigoo, Amino, Amoi, Andowl, Angelcare, Anker, Anry, ANS, ANXONIT, AOC, Aocos, AOpen, Aoro, Aoson, AOYODKG, Apple, Aquarius, Archos, Arian Space, Ark, ArmPhone, Arnova, ARRIS, Artel, Artizlee, ArtLine, Arçelik, Asano, Asanzo, Ask, Aspera, ASSE, Assistant, Astro, Asus, AT&T, Athesi, Atlantic Electrics, Atmaca Elektronik, ATMAN, ATOL, Atom, Attila, Atvio, Audiovox, AURIS, Autan, AUX, Avaya, Avenzo, AVH, Avvio, Awow, AWOX, AXEN, Axioo, AXXA, Axxion, AYA, AYYA, Azumi Mobile, b2m, Backcell, BAFF, BangOlufsen, Barnes & Noble, BARTEC, BASE, BAUHN, BBK, BB Mobile, BDF, BDQ, BDsharing, Beafon, Becker, Beeline, Beelink, Beetel, Beista, Beko, Bellphone, Benco, Benesse, BenQ, BenQ-Siemens, BenWee, Benzo, Beyond, Bezkam, BGH, Bigben, BIHEE, BilimLand, Billion, Billow, BioRugged, Bird, Bitel, Bitmore, Bittium, Bkav, Black Bear, Black Box, Black Fox, Blackpcs, Blackview, Blaupunkt, Bleck, BLISS, Blloc, Blow, Blu, Bluboo, Bluebird, Bluedot, Bluegood, BlueSky, Bluewave, BluSlate, BMAX, Bmobile, BMXC, Bobarry, bogo, Bolva, Bookeen, Boost, Botech, Boway, bq, BrandCode, Brandt, BRAVE, Bravis, BrightSign, Brigmton, Brondi, BROR, BS Mobile, Bubblegum, Bundy, Bush, BuzzTV, C5 Mobile, CAGI, Camfone, Canal+, Canal Digital, Canguro, Capitel, Captiva, Carbon Mobile, Carrefour, Casio, Casper, Cat, Cavion, Cecotec, Ceibal, Celcus, Celkon, Cell-C, Cellacom, CellAllure, Cellution, Centric, CG Mobile, CGV, Chainway, Changhong, Cherry Mobile, Chico Mobile, ChiliGreen, China Mobile, China Telecom, Chuwi, CipherLab, Citycall, CKK Mobile, Claresta, Clarmin, CLAYTON, ClearPHONE, Clementoni, Cloud, Cloudfone, Cloudpad, Clout, CnM, Cobalt, Coby Kyros, Colors, Comio, Compal, Compaq, COMPUMAX, ComTrade Tesla, Conceptum, Concord, ConCorde, Condor, Connectce, Connex, Conquest, Continental Edison, Contixo, Coolpad, Coopers, CORN, Cosmote, Covia, Cowon, COYOTE, CreNova, Crescent, Cricket, Crius Mea, Crony, Crosscall, Crown, Ctroniq, Cube, CUBOT, CVTE, Cwowdefu, Cyrus, D-Link, D-Tech, Daewoo, Danew, DangcapHD, Dany, DASS, Datalogic, Datamini, Datang, Datawind, Datsun, Dazen, DbPhone, Dbtel, Dcode, DEALDIG, Dell, Denali, Denver, Desay, DeWalt, DEXP, DEYI, DF, DGTEC, Dialog, Dicam, Digi, Digicel, DIGICOM, Digidragon, DIGIFORS, Digihome, Digiland, Digit4G, Digma, DIJITSU, DIKOM, DIMO, Dinalink, Dinax, DING DING, DIORA, DISH, Disney, Ditecma, Diva, DiverMax, Divisat, DIXON, DL, DMM, DNS, DoCoMo, Doffler, Dolamee, Dom.ru, Doogee, Doopro, Doov, Dopod, Doppio, DORLAND, Doro, DPA, DRAGON, Dragon Touch, Dreamgate, DreamStar, DreamTab, Droxio, DSDevices, DSIC, Dtac, Dune HD, DUNNS Mobile, Durabook, Duubee, Dyon, E-Boda, E-Ceros, E-tel, Eagle, EAS Electric, Easypix, EBEN, EBEST, Echo Mobiles, ecom, ECON, ECOO, ECS, Edenwood, EE, EFT, EGL, Einstein, EKINOX, EKO, Eks Mobility, EKT, ELARI, Elecson, Electroneum, ELECTRONIA, Elekta, Elektroland, Element, Elenberg, Elephone, Elevate, Elong Mobile, Eltex, Ematic, Emporia, ENACOM, Energizer, Energy Sistem, Engel, ENIE, Enot, eNOVA, Entity, Envizen, Ephone, Epic, Epik One, Epson, Equator, Ergo, Ericsson, Ericy, Erisson, Essential, Essentielb, eSTAR, Eton, eTouch, Etuline, Eurocase, Eurostar, Evercoss, Everest, Everex, Evertek, Evolio, Evolveo, Evoo, EVPAD, EvroMedia, EWIS, EXCEED, Exmart, ExMobile, EXO, Explay, Express LUCK, Extrem, EYU, Ezio, Ezze, F&U, F+, F2 Mobile, F150, Facebook, Facetel, Facime, Fairphone, Famoco, Famous, Fantec, FaRao Pro, Farassoo, FarEasTone, Fengxiang, FEONAL, Fero, FFF SmartLife, Figgers, FiGi, FiGO, FiiO, Filimo, FILIX, FinePower, Finlux, FireFly Mobile, FISE, FITCO, Fluo, Fly, FLYCAT, FMT, FNB, FNF, Fobem, Fondi, Fonos, FOODO, FORME, Formuler, Forstar, Fortis, FOSSiBOT, Fourel, Four Mobile, Foxconn, FoxxD, FPT, Freetel, FreeYond, Frunsi, Fuego, Fujitsu, Funai, Fusion5, Future Mobile Technology, Fxtec, G-TiDE, G-Touch, Galactic, Galaxy Innovations, Gamma, Garmin-Asus, Gateway, Gazer, Geanee, Geant, Gear Mobile, Gemini, General Mobile, Genesis, GEOFOX, Geotel, Geotex, GEOZON, Getnord, GFive, Gfone, Ghia, Ghong, Ghost, Gigabyte, Gigaset, Gini, Ginzzu, Gionee, GIRASOLE, Globex, Glofiish, GLONYX, GLX, GOCLEVER, Gocomma, GoGEN, GoldMaster, Gol Mobile, Goly, Gome, GoMobile, GOODTEL, Google, Goophone, Gooweel, Gplus, Gradiente, Graetz, Grape, Great Asia, Gree, Green Orange, Greentel, Gresso, Gretel, GroBerwert, Grundig, Gtel, GTMEDIA, GTX, Guophone, H96, H133, Hafury, Haier, Haipai, Hamlet, Hammer, Handheld, HannSpree, Hanseatic, HAOQIN, HAOVM, Hardkernel, Harper, Hartens, Hasee, Hathway, HDC, HeadWolf, Helio, HERO, HexaByte, Hezire, Hi, Hi-Level, Hiberg, High Q, Highscreen, HiHi, HiKing, HiMax, Hi Nova, HIPER, Hipstreet, Hiremco, Hisense, Hitachi, Hitech, HKC, HKPro, HLLO, HOFER, Hoffmann, Homatics, Hometech, Homtom, Honeywell, Hoozo, Horizon, Horizont, Hosin, Hotel, Hot Pepper, HOTREALS, Hotwav, How, HP, HTC, Huadoo, Huagan, Huavi, Huawei, Hugerock, Humax, Hurricane, Huskee, Hykker, Hyrican, Hytera, Hyundai, Hyve, i-Cherry, I-INN, i-Joy, i-mate, i-mobile, iBall, iBerry, ibowin, iBrit, IconBIT, iData, iDino, iDroid, iGet, iHunt, Ikea, IKI Mobile, iKoMo, iKon, iKonia, IKU Mobile, iLA, iLepo, iLife, iMan, iMars, iMI, IMO Mobile, Imose, Impression, iMuz, iNavi, INCAR, Inch, Inco, iNew, Infiniton, Infinix, InFocus, InfoKit, InFone, Inhon, Inkti, InnJoo, Innos, Innostream, Inoi, iNo Mobile, iNOVA, INQ, Insignia, INSYS, Intek, Intel, Intex, Invens, Inverto, Invin, iOcean, iOutdoor, iPEGTOP, iPro, iQ&T, IQM, IRA, Irbis, iReplace, Iris, iRobot, iRola, iRulu, iSafe Mobile, iStar, iSWAG, IT, iTel, iTruck, IUNI, iVA, iView, iVooMi, ivvi, iWaylink, iXTech, iYou, iZotron, JAY-Tech, Jedi, Jeka, Jesy, JFone, Jiake, Jiayu, Jinga, Jio, Jivi, JKL, Jolla, Joy, JoySurf, JPay, JREN, Jumper, Juniper Systems, Just5, JVC, JXD, K-Lite, K-Touch, Kaan, Kaiomy, Kalley, Kanji, Kapsys, Karbonn, Kata, KATV1, Kazam, Kazuna, KDDI, Kempler & Strauss, Kenbo, Kendo, Keneksi, Kenxinda, Khadas, Kiano, Kingbox, Kingstar, Kingsun, KINGZONE, Kinstone, Kiowa, Kivi, Klipad, KN Mobile, Kocaso, Kodak, Kogan, Komu, Konka, Konrow, Koobee, Koolnee, Kooper, KOPO, Koridy, Koslam, Kraft, KREZ, KRIP, KRONO, Krüger&Matz, KT-Tech, KUBO, KuGou, Kuliao, Kult, Kumai, Kurio, Kvant, Kydos, Kyocera, Kyowon, Kzen, KZG, L-Max, LAIQ, Land Rover, Landvo, Lanin, Lanix, Lark, Laurus, Lava, LCT, Leader Phone, Leagoo, Leben, LeBest, Lectrus, Ledstar, LeEco, Leelbox, Leff, Legend, Leke, Lemco, LEMFO, Lemhoov, Lenco, Lenovo, Leotec, Le Pan, Lephone, Lesia, Lexand, Lexibook, LG, Liberton, Lifemaxx, Lime, Lingwin, Linnex, Linsar, Linsay, Listo, LNMBBS, Loewe, Logic, Logic Instrument, Logicom, Logik, LOKMAT, Loview, Lovme, LPX-G, LT Mobile, Lumigon, Lumitel, Lumus, Luna, Luxor, LYF, M-Horse, M-Tech, M.T.T., M3 Mobile, M4tel, MAC AUDIO, Macoox, Mafe, Magicsee, Magnus, Majestic, Malata, Mango, Manhattan, Mann, Manta Multimedia, Mantra, Mara, Marshal, Mascom, Massgo, Masstel, Master-G, Mastertech, Matco Tools, Matrix, Maunfeld, Maxcom, Maxfone, Maximus, Maxtron, MAXVI, Maxwell, Maxwest, MAXX, Maze, Maze Speed, MBI, MBOX, MDC Store, MDTV, meanIT, Mecer, Mecool, Mediacom, MediaTek, Medion, MEEG, MegaFon, MEGA VISION, Meitu, Meizu, Melrose, Memup, MEO, Meta, Metz, MEU, MicroMax, Microsoft, Microtech, Minix, Mint, Mintt, Mio, Mione, Miray, Mitchell & Brown, Mito, Mitsubishi, Mitsui, MIVO, MIWANG, MIXC, MiXzo, MLAB, MLLED, MLS, MMI, Mobell, Mobicel, MobiIoT, Mobiistar, Mobile Kingdom, Mobiola, Mobistel, MobiWire, Mobo, Mobvoi, Modecom, Mofut, Mosimosi, Motiv, Motorola, Movic, MOVISUN, Movitel, Moxee, mPhone, Mpman, MSI, MStar, MTC, MTN, Multilaser, MultiPOS, MwalimuPlus, MYFON, MyGica, MygPad, Mymaga, MyMobile, MyPhone, Myria, Myros, Mystery, MyTab, MyWigo, N-one, Nabi, NABO, Nanho, Naomi Phone, NASCO, National, Navcity, Navitech, Navitel, Navon, NavRoad, NEC, Necnot, Nedaphone, Neffos, NEKO, Neo, neoCore, Neolix, Neomi, Neon IQ, NetBox, Netgear, Netmak, NeuImage, NeuTab, NEVIR, New Balance, New Bridge, Newgen, Newland, Newman, Newsday, NewsMy, Nexa, NEXBOX, Nexian, NEXON, NEXT, Next & NextStar, Nextbit, NextBook, NextTab, NGM, NG Optics, NGpon, Nikon, NINETEC, Nintendo, nJoy, NOA, Noain, Nobby, Noblex, NOBUX, noDROPOUT, NOGA, Nokia, Nomi, Nomu, Noontec, Nordmende, NORMANDE, NorthTech, Nos, Nothing Phone, Nous, Novacom, Novex, Novey, NOVO, NTT West, NuAns, Nubia, NUU Mobile, NuVision, Nuvo, Nvidia, NYX Mobile, O+, O2, Oale, Oangcc, OASYS, Obabox, Ober, Obi, OCEANIC, Odotpad, Odys, OINOM, Ok, Okapia, Oking, OKSI, OKWU, Olax, Olkya, Ollee, OLTO, Olympia, OMIX, Onda, OneClick, OneLern, OnePlus, Onida, Onix, Onkyo, ONN, ONVO, ONYX BOOX, Ookee, Ooredoo, OpelMobile, Openbox, Ophone, OPPO, Opsson, Optoma, Orange, Orava, Orbic, Orbita, Orbsmart, Ordissimo, Orion, OSCAL, OTTO, OUJIA, Ouki, Oukitel, OUYA, Overmax, Ovvi, Owwo, OYSIN, Oysters, Oyyu, OzoneHD, P-UP, Packard Bell, Paladin, Palm, Panacom, Panasonic, Pano, Panoramic, Pantech, PAPYRE, Parrot Mobile, Partner Mobile, PCBOX, PCD, PCD Argentina, PC Smart, PEAQ, Pelitt, Pendoo, Penta, Pentagram, Perfeo, Phicomm, Philco, Philips, Phonemax, phoneOne, Pico, PINE, Pioneer, Pioneer Computers, PiPO, PIRANHA, Pixela, Pixelphone, Pixus, Planet Computers, Platoon, Play Now, Ployer, Plum, PlusStyle, Pluzz, PocketBook, POCO, Point Mobile, Point of View, Polar, PolarLine, Polaroid, Polestar, PolyPad, Polytron, Pomp, Poppox, POPTEL, Porsche, Positivo, Positivo BGH, PPTV, Premier, Premio, Prestigio, PRIME, Primepad, Primux, Pritom, Prixton, PROFiLO, Proline, Prology, ProScan, PROSONIC, Protruly, ProVision, PULID, Punos, Purism, Q-Box, Q-Touch, Q.Bell, QFX, Qilive, QLink, QMobile, Qnet Mobile, QTECH, Qtek, Quantum, Quatro, Qubo, Quechua, Quest, Quipus, Qumo, Qware, R-TV, Rakuten, Ramos, Raspberry, Ravoz, Raylandz, Razer, RCA Tablets, Reach, Readboy, Realme, RED, Redbean, Redfox, RedLine, Redway, Reeder, REGAL, RelNAT, Remdun, Retroid Pocket, Revo, Revomovil, Ricoh, Rikomagic, RIM, Rinno, Ritmix, Ritzviva, Riviera, Rivo, Rizzen, ROADMAX, Roadrover, Roam Cat, ROiK, Rokit, Roku, Rombica, Ross&Moor, Rover, RoverPad, Royole, RoyQueen, RT Project, RugGear, RuggeTech, Ruggex, Ruio, Runbo, Rupa, Ryte, S-TELL, S2Tel, Saba, Safaricom, Sagem, Sagemcom, Saiet, SAILF, Salora, Samsung, Samtech, Samtron, Sanei, Sankey, Sansui, Santin, SANY, Sanyo, Savio, Sber, SCBC, Schneider, Schok, Scosmos, Seatel, SEBBE, Seeken, SEEWO, SEG, Sega, SEHMAX, Selecline, Selenga, Selevision, Selfix, SEMP TCL, Sencor, Sendo, Senkatel, Senseit, Senwa, Seuic, Sewoo, SFR, SGIN, Shanling, Sharp, Shift Phones, Shivaki, Shtrikh-M, Shuttle, Sico, Siemens, Sigma, Silelis, Silent Circle, Silva Schneider, Simbans, simfer, Simply, Singtech, Siragon, Sirin Labs, SK Broadband, SKG, SKK Mobile, Sky, Skyline, SkyStream, Skytech, Skyworth, Smadl, Smailo, Smart, Smartab, SmartBook, SMARTEC, Smart Electronic, Smartex, Smartfren, Smartisan, Smart Kassel, Smarty, Smooth Mobile, Smotreshka, SNAMI, SobieTech, Soda, Softbank, Soho Style, Solas, SOLE, SOLO, Solone, Sonim, SONOS, Sony, Sony Ericsson, SOSH, Soundmax, Soyes, Spark, Sparx, SPC, Spectralink, Spectrum, Spice, Sprint, SPURT, SQOOL, SSKY, Star, Starlight, Starmobile, Starway, Starwind, STF Mobile, STG Telecom, STK, Stonex, Storex, StrawBerry, Stream, STRONG, Stylo, Subor, Sugar, Sumvision, Sunmax, Sunmi, Sunny, Sunstech, SunVan, Sunvell, SUNWIND, SuperBOX, Super General, SuperSonic, SuperTab, Supra, Supraim, Surge, Suzuki, Sveon, Swipe, SWISSMOBILITY, Swisstone, Switel, SWTV, Syco, SYH, Sylvania, Symphony, Syrox, T-Mobile, T96, TADAAM, TAG Tech, Taiga System, Takara, Talius, Tambo, Tanix, TAUBE, TB Touch, TCL, TD Systems, TD Tech, TeachTouch, Technicolor, Technika, TechniSat, Technopc, TechnoTrend, TechPad, TechSmart, Techwood, Teclast, Tecno Mobile, TecToy, TEENO, Teknosa, Tele2, Telefunken, Telego, Telenor, Telia, Telit, Telma, TeloSystems, Telpo, TENPLUS, Teracube, Tesco, Tesla, TETC, Tetratab, teXet, ThL, Thomson, Thuraya, TIANYU, Tibuta, Tigers, Time2, Timovi, TIMvision, Tinai, Tinmo, TiPhone, TiVo, TJC, TOKYO, Tolino, Tone, TOOGO, Tooky, TopDevice, TOPDON, Topelotek, Top House, Toplux, TOPSHOWS, Topsion, Topway, Torex, Torque, TOSCIDO, Toshiba, Touchmate, Touch Plus, TOX, TPS, Transpeed, TrekStor, Trevi, Trident, Trifone, Trio, Tronsmart, True, True Slim, Tsinghua Tongfang, TTEC, TTK-TV, TuCEL, Tunisie Telecom, Turbo, Turbo-X, TurboKids, TurboPad, Turkcell, TVC, TwinMOS, TWM, Twoe, TWZ, Tymes, Türk Telekom, U-Magic, U.S. Cellular, UE, UGINE, Ugoos, Uhans, Uhappy, Ulefone, Umax, UMIDIGI, Unblock Tech, Uniden, Unihertz, Unimax, Uniqcell, Uniscope, Unistrong, Unitech, UNIWA, Unknown, Unnecto, Unnion Technologies, UNNO, Unonu, Unowhy, UOOGOU, Urovo, UTime, UTOK, UTStarcom, UZ Mobile, V-Gen, V-HOME, V-HOPE, v-mobile, VAIO, VALEM, VALTECH, VANGUARD, Vankyo, Vargo, Vastking, VAVA, VC, VDVD, Vega, Vekta, Venso, Venstar, Venturer, VEON, Verico, Verizon, Vernee, Verssed, Versus, Vertex, Vertu, Verykool, Vesta, Vestel, VETAS, Vexia, VGO TEL, ViBox, Victurio, VIDA, Videocon, Videoweb, ViewSonic, VIIPOO, Vinabox, Vinga, Vinsoc, Vios, Viper, Vipro, Virzo, Vision Touch, Visual Land, Vitelcom, Vityaz, Viumee, Vivax, VIVIMAGE, Vivo, VIWA, Vizio, Vizmo, VK Mobile, VKworld, Vodacom, Vodafone, VOGA, VOLKANO, Volt, Vonino, Vontar, Vorago, Vorcom, Vorke, Vormor, Vortex, Voto, VOX, Voxtel, Voyo, Vsmart, Vsun, VUCATIMES, Vue Micro, Vulcan, VVETIME, Völfen, WAF, Walker, Walton, Waltter, Wanmukang, WANSA, WE, We. by Loewe., Webfleet, Web TV, Wecool, Weelikeit, Weimei, WellcoM, WELLINGTON, Western Digital, Westpoint, Wexler, White Mobile, Wieppo, Wigor, Wiko, Wileyfox, Winds, Wink, Winmax, Winnovo, Winstar, Wintouch, Wiseasy, WIWA, WizarPos, Wizz, Wolder, Wolfgang, Wolki, WONDER, Wonu, Woo, Wortmann, Woxter, X-AGE, X-BO, X-Mobile, X-TIGI, X-View, X.Vision, X88, X96, X96Q, Xcell, XCOM, Xcruiser, XElectron, XGEM, XGIMI, Xgody, Xiaodu, Xiaolajiao, Xiaomi, Xion, Xolo, Xoro, Xshitou, Xtouch, Xtratech, Xwave, XY Auto, Yandex, Yarvik, YASIN, YELLYOUTH, YEPEN, Yes, Yestel, Yezz, Yoka TV, Yooz, Yota, YOTOPT, Youin, Youwei, Ytone, Yu, Yuandao, YU Fly, YUHO, YUMKEM, YUNDOO, Yuno, YunSong, Yusun, Yxtel, Z-Kai, Zaith, Zamolxe, Zatec, Zealot, Zeblaze, Zebra, Zeeker, Zeemi, Zen, Zenek, Zentality, Zfiner, ZH&K, Zidoo, ZIFRO, Zigo, ZIK, Zinox, Ziox, Zonda, Zonko, Zoom, ZoomSmart, Zopo, ZTE, Zuum, Zync, ZYQ, Zyrex, öwn
deviceModel Device model
Example values: iPad, Nexus 5, Galaxy S5, Fire TV, etc.
deviceType Device type
Example values: desktop, smartphone, tablet, feature phone, console, tv, car browser, smart display, camera, portable media player, phablet, smart speaker, wearable, peripheral
fingerprint Fingerprint
Note: This segment can only be used by an Admin user
Example values: 1eceaa833348b187 - any 16 Hexadecimal chars ID, which can be fetched from API.getLastVisitsDetails
visitLocalHour Local time — hour (start of visit)
Example values: 0, 1, 2, 3, ..., 20, 21, 22, 23
operatingSystemName Operating system
Example values: Windows, Linux, Mac, Android, iOS etc.
operatingSystemCode Operating system code
Example values: WIN, LIN, MAX, AND, IOS etc.
operatingSystemVersion Operating system version
Example values: XP, 7, 2.3, 5.1, ...
profilable Profilable
Example values: 1 for profilable (eg cookies were used), 0 for not profilable (eg no cookies were used)
resolution Resolution
Example values: 1280x1024, 800x600, etc.
visitStartServerHour Site time — hour (start of visit)
Example values: 0, 1, 2, 3, ..., 20, 21, 22, 23
visitServerHour Site time — hour (time of last action)
Example values: 0, 1, 2, 3, ..., 20, 21, 22, 23
visitEndServerDate Time in UTC — date (time of last action)
Example values: 2018-12-31, 2018-03-20, ...
visitEndServerDayOfMonth Time in UTC — day of month (time of last action)
Example values: 0, 1, 2, 3, ..., 29, 30, 31
visitEndServerDayOfWeek Time in UTC — day of week (time of last action)
Example values: 1, 2, 3, 4, 5, 6, 7
visitEndServerDayOfYear Time in UTC — day of year (time of last action)
Example values: 1, 2, 3, 4, ..., 365, 366
visitStartServerMinute Time in UTC — minute (start of visit)
Example values: 0, 1, 2, 3, ..., 56, 57, 58, 59
visitEndServerMinute Time in UTC — minute (time of last action)
Example values: 0, 1, 2, 3, ..., 56, 57, 58, 59
visitEndServerMonth Time in UTC — month (time of last action)
Example values: 1, 2, 3, ..., 11, 12
visitEndServerQuarter Time in UTC — quarter (time of last action)
Example values: 1, 2, 3, 4
visitEndServerSecond Time in UTC — second (Time of last action)
Example values: 0, 1, 2, 3, ..., 58, 59
visitEndServerWeekOfYear Time in UTC — week of year (time of last action)
Example values: 1, 2, 3, 4, ..., 51, 52, 53
visitEndServerYear Time in UTC — year (time of last action)
Example values: 2016, 2017, 2018, ..., 9998, 9999
userId User ID
Note: This segment can only be used by an Admin user
Example values: any non empty unique string identifying the user (such as an email address or a username).
visitEcommerceStatus Visit Ecommerce status at the end of the visit
Example values: none, ordered, abandonedCart, orderedThenAbandonedCart. For example, to select all visits that have made an Ecommerce order, the API request would contain "&segment=visitEcommerceStatus==ordered,visitEcommerceStatus==orderedThenAbandonedCart"
visitId Visit ID
Note: This segment can only be used by an Admin user
Example values: Any integer.
visitConvertedGoalId Visit converted a specific Goal Id
Example values: 1, 2, 3, etc.
visitConvertedGoalName Visit converted a specific Goal Name
Example values: myGoal, myOtherGoal, etc.
visitConverted Visit converted at least one Goal
Example values: 0, 1
visitorType Visit type
Example values: new, returning, returningCustomer. For example, to select all visitors who have returned to the website, including those who have bought something in their previous visits, the API request would contain "&segment=visitorType==returning,visitorType==returningCustomer"
visitorId Visitor ID
Note: This segment can only be used by an Admin user
Example values: 34c31e04394bdc63 - any 16 Hexadecimal chars ID, which can be fetched using the Tracking API function getVisitorId()
Visitor location
city City
Example values: Sydney, Sao Paolo, Rome, etc.
continentCode Continent
Example values: eur, asi, amc, amn, ams, afr, ant, oce
countryName Country
Example values: Germany, France, Spain, ...
countryCode Country code
Example values: ISO 3166-1 alpha-2 country codes (de, us, fr, in, es, etc.)
languageCode Language
Example values: de, fr, en-gb, zh-cn, etc.
latitude Latitude
Example values: -33.578, 40.830, etc.
You can select visitors within a lat/long range using &segment=lat>X;lat<Y;long>M;long<N.
longitude Longitude
Example values: -70.664, 14.326, etc.
regionCode Region
Example values: 01 02, OR, P8, etc.
eg. region=BFC;country=fr
Custom Variables
customVariableName1 Custom Variable name 1 (scope visit)
customVariableName2 Custom Variable name 2 (scope visit)
customVariablePageName1 Custom Variable name 1 (scope page)
customVariablePageValue1 Custom Variable value 1 (scope page)
customVariableValue1 Custom Variable value 1 (scope visit)
customVariableValue2 Custom Variable value 2 (scope visit)
There are 5 custom variables available, so you can segment across any segment name and value range.
For example, customVariableName1==Type;customVariableValue1==Customer
Returns all visitors that have the Custom Variable "Type" set to "Customer".
Custom Variables of scope "page" can be queried separately. For example, to query the Custom Variable of scope "page",
stored in index 1, you would use the segment customVariablePageName1==ArticleLanguage;customVariablePageValue1==FR
Behaviour
actionType Action Type
Example values: A type of action, such as: pageviews, contents, sitesearches, events, outlinks, downloads
actionUrl Action URL
siteSearchCategory Category (Site Search)
outlinkUrl Clicked Outlink
contentInteraction Content Interaction
Example values: The type of interaction with the content. For instance "click" or "submit".
contentName Content Name
Example values: The name of a content block, for instance "Ad Sale"
contentPiece Content Piece
Example values: The actual content. For instance "ad.jpg" or "My text ad"
contentTarget Content Target
Example values: For instance the URL of a landing page: "http://landingpage.example.com"
downloadUrl Download URL
entryPageUrl Entry Page URL
entryPageTitle Entry Page title
exitPageTitle Exit Page Title
exitPageUrl Exit Page URL
siteSearchKeyword Keyword (Site Search)
siteSearchCount Keyword count (Site Search)
pageTitle Page Title
pageUrl Page URL
actionServerHour Site time — hour
actionServerMinute Time in UTC — minute
Example values: 0, 1, 2, 3, ..., 56, 57, 58, 59
Events
eventAction Event Action
eventCategory Event Category
eventName Event Name
eventUrl Event URL
Example values: The URL must be URL encoded, for example: http%3A%2F%2Fexample.com%2Fpath%2Fpage%3Fquery
Acquisition
adClickId Ad Click ID
Example values: A unique Click ID which was generated by an ad provider and used by visitors to reach your website.
adProvider Ad provider
Example values: An ad provider that refers visitors to your website with a specific Click ID.
campaignContent Campaign Content
campaignGroup Campaign Group
campaignId Campaign Id
campaignKeyword Campaign Keyword
campaignMedium Campaign Medium
campaignName Campaign Name
campaignPlacement Campaign Placement
campaignSource Campaign Source
referrerType Channel Type
Example values: direct, search, website, campaign
referrerKeyword Keyword
Example values: Encoded%20Keyword, keyword
referrerName Referrer Name
Example values: twitter.com, www.facebook.com, Bing, Google, Yahoo, CampaignName
referrerUrl Referrer URL
Example values: http%3A%2F%2Fwww.example.org%2Freferer-page.htm
Ecommerce
productCategory Product Category
productName Product Name
productSku Product SKU
productViewCategory Viewed Product Category
productViewName Viewed Product Name
productViewSku Viewed Product SKU
Funnels
funnels_name Visit participated in funnel
Example values: Accepts any funnel name of a currently activated funnel.
Forms
form_name Form Name
Example values: Accepts any form name of a currently running form.
Media
media_impression_type Impressions of media type
Example values: Segment visitors who have viewed a page that had this media type on the page, needs to be either 'audio' or 'video'
media_player Media player
Example values: Segment visitors who used a certain media player on your website
media_resource Media resource URL
Example values: Accepts any media resource (audio / video URL)
media_title Media title
Example values: Accepts any title of your media titles
media_plays_type Plays of media type
Example values: Segment visitors who have played a specific media type, needs to be either 'audio' or 'video'
A/B Tests
abtesting_experiment A/B test
Example values: Accepts any experiment name of a currently running or finished experiment.
abtesting_variation Variation
Example values: Accepts any variation name of a currently running or finished experiment.
abtesting_entered Visit entered A/B test
Example values: Eg "1", "0", "true", "false"
Crashes
crashCategory Crash Category
crashHour Crash Hour
Example values: 0, 1, 2, 3, ..., 20, 21, 22, 23
crashMessage Crash Message
crashMinute Crash Minute
Example values: 0, 1, 2, 3, ..., 56, 57, 58, 59
crashType Crash Type
Example values: A crash type such as "TypeError" or "SyntaxError".
crashSource Source

Metrics
Visitors
actions Actions In Visit
daysSinceFirstVisit Days since first visit
daysSinceLastEcommerceOrder Days since last Ecommerce order
daysSinceLastVisit Days since last visit
events Events
Example values: To select all visits who triggered an Event, use: &segment=events>0
visitLocalMinute Local time — minute (start of visit)
Example values: 0, 1, 2, 3, ..., 67, 57, 58, 59
interactions Number of Interactions
Example values: Any positive integer
searches Number of Internal Searches
Example values: To select all visits who used internal Site Search, use: &segment=searches>0
visitCount Number of visits
secondsSinceFirstVisit Seconds since first visit
secondsSinceLastEcommerceOrder Seconds since last Ecommerce order
secondsSinceLastVisit Seconds since last visit
visitDuration Visit Duration (in seconds)
visitIp Visitor IP
Note: This segment can only be used by an Admin user
Example values: 13.54.122.1. Select IP ranges with notation: visitIp>13.54.122.0;visitIp<13.54.122.255
Events
eventValue Event value
Ecommerce
orderId Order ID
revenueOrder Order Revenue
productPrice Product Price
revenueAbandonedCart Revenue Left In Cart
productViewPrice Viewed Product Price
Funnels
funnels_step_position Visit participated in funnel at step position
Example values: Accepts any step position (eg 1, 2, or 3). Should be used in conjunction with the funnel name segment as it might otherwise match multiple funnels
Forms
form_converted Form Converted
Example values: Accepts either 1 or 0.
form_num_starts Number of Form Starts
Example values: Accepts any number of form starts.
form_num_submissions Number of Form Submissions
Example values: Accepts any number of form submissions.
form_timespent Spent Time on Form (in ms)
Example values: Any number in milliseconds, for example 1000.
Media
media_length Media length (in seconds)
Example values: Segment visitors who watched a video or listened to audio with a certain length. In seconds
media_spent_time Time spent playing media (in seconds)
Example values: Segment for how long a user watched a video or listened to an audio. In seconds
media_time_initial_play Time to initial media play (in seconds)
Example values: Segment for how long it took for a user to start a video. In seconds

Segment values must be URL encoded

The segment value (located after the segment operator) must be URL encoded before being sent to Matomo. For example to select all visitors that visited your website via a Search keyword containing My brand, you need to URL encode the value such as: &segment=referrerKeyword!@My%20brand.

Segment where value is empty / is not empty

You may sometimes want to segment your analytics reports, for all visitors where a given dimension is empty (a value was not set). This is similar to the SQL "is null" clause. To do so, you can leave the value blank after the operator == in the segment string. For example, to select all visitors that did not have any referrer keyword set, you can write: referrerKeyword==

You can combine it with other segments, for example to select all visitors that come from India and did not have any keyword set: referrerKeyword==;countryCode==in

Similarly, you can segment your traffic to select visitors where a particular segment is not empty (a value was set). This is similar to the SQL "is not null" clause. To do so, you can leave the value blank after the operator != in the segment string. For example to select all visitors that come from India and have a City set, you can write: city!=;countryCode==in

Note: Leaving an empty value is supported for the operators == and !==