{"id":1137,"date":"2023-08-30T13:42:17","date_gmt":"2023-08-30T09:42:17","guid":{"rendered":"https:\/\/yellowweb.top\/?p=1137"},"modified":"2026-05-05T20:40:05","modified_gmt":"2026-05-05T16:40:05","slug":"probrasyvaem-sub-metki-cherez-konstruktor-wix","status":"publish","type":"post","link":"https:\/\/yellowweb.top\/en\/probrasyvaem-sub-metki-cherez-konstruktor-wix\/","title":{"rendered":"Passing Sub IDs Through Wix"},"content":{"rendered":"<p class=\"wp-block-paragraph\">The first thing to do is to fill the site with content: add all the necessary pictures and captions. After everything is ready, turn on the developer mode. To do this, press the button as on the screenshot below:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"915\" height=\"516\" src=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2.png\" alt=\"\" class=\"wp-image-1140\" srcset=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2.png 915w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2-300x169.png 300w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2-768x433.png 768w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2-18x10.png 18w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-2-20x11.png 20w\" sizes=\"auto, (max-width: 915px) 100vw, 915px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">At the bottom you get a code editor, go to it:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"460\" src=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image.png\" alt=\"\" class=\"wp-image-1138\" srcset=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image.png 1008w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-300x137.png 300w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-768x350.png 768w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-18x8.png 18w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-20x9.png 20w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Highlight ALL the code that is there and paste ours in its place:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code><strong>import<\/strong> wixLocation <strong>from<\/strong> 'wix-location';<br>$w.onReady(<strong>function<\/strong> () {<br>&nbsp;&nbsp;&nbsp;&nbsp;<strong>function<\/strong> getParametersAsString(url) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong> url.substring(url.indexOf(\"?\"), url.length)<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;\/\/Start of the image click handler<br>&nbsp;&nbsp;&nbsp;&nbsp; $w('#image1').onClick((event) =&gt; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wixLocation.to(\"https:\/\/google.com\" + getParametersAsString(wixLocation.url));<br>&nbsp;&nbsp;&nbsp;&nbsp;});<br>&nbsp;&nbsp;&nbsp;&nbsp;\/\/End of handler<br>});<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Check carefully that you have copied everything correctly! Especially if you are on a MAC! Check that the quotation marks look like quotation marks and not quot!!!!!<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now let's see what is the name of our image, which we have inserted on the page and which will be clicked by users. To do this, we click on the image and see that it has its name in the top corner. In this case, image3.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"402\" src=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4.png\" alt=\"\" class=\"wp-image-1142\" srcset=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4.png 869w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4-300x139.png 300w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4-768x355.png 768w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4-18x8.png 18w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-4-20x9.png 20w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You will most likely have an image <code>image1<\/code>if it is not, then fix the line in the code. <code>image1 <\/code>to your image title.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>If you have a button rather than an image, then fix image1 to button1 or whatever it's called. If you have several buttons or images, copy the code between the lines \"Handler start - Handler end\" and paste them as many times as you need (according to the number of buttons and\/or images). Write a different button\/image ID in each of the pasted pieces of code.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last step is to change in the code <a href=\"https:\/\/google.com\">https:\/\/google.com<\/a> \u043d\u0430 \u0432\u0430\u0448\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u041a\u0435\u0439\u0442\u0430\u0440\u043e \u0411\u0415\u0417 \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u0445\u0432\u043e\u0441\u0442\u0430 \u0438\u0437 \u043c\u0435\u0442\u043e\u043a.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Publish our site in Vix with the button <strong>Publish<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"166\" src=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-3.png\" alt=\"\" class=\"wp-image-1141\" srcset=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-3.png 686w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-3-300x73.png 300w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-3-18x4.png 18w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-3-20x5.png 20w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Vix gives us a link to the site. Copy it!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1074\" height=\"501\" src=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1.png\" alt=\"\" class=\"wp-image-1139\" srcset=\"https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1.png 1074w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1-300x140.png 300w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1-1024x478.png 1024w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1-768x358.png 768w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1-18x8.png 18w, https:\/\/yellowweb.top\/wp-content\/uploads\/2023\/08\/image-1-20x9.png 20w\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Paste the link into your browser and add any sub-tags to the end of it. For example: <a href=\"https:\/\/rattack5.wixsite.com\/mysite?sub1=abc&amp;sub2=345\">https:\/\/rattack5.wixsite.com\/mysite?sub1=abc&amp;sub2=345<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Enter. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448 \u0441\u0430\u0439\u0442. \u041f\u0440\u0438 \u0449\u0435\u043b\u0447\u043a\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u043c\u043f\u0430\u043d\u0438\u044e \u0442\u0440\u0435\u043a\u0435\u0440\u0430: <a href=\"http:\/\/example.com?sub1=abc&amp;sub2=345&nbsp;\">http:\/\/example.com?sub1=abc&amp;sub2=345&nbsp;<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Bonus: adding autoredirect with cloaking<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We can determine by UserAgent who came to us. If it's a Facebook bot, we leave it on our page, if it's a regular user, we can automatically redirect it to the offer. In the example below, the auto redirect happens after 300 ms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code><strong>import<\/strong> wixLocation <strong>from<\/strong> 'wix-location';<br><strong>function<\/strong> getParametersAsString(url) {<br>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong> url.substring(url.indexOf(\"?\")+1, url.length);<br>}<br><strong>function<\/strong> isFacebookBot() {<br>&nbsp;&nbsp;<strong>var<\/strong> userAgent = navigator.userAgent.toLowerCase();<br>&nbsp;&nbsp;<strong>return<\/strong> userAgent.includes('facebook') || userAgent.includes('facebot');<br>}<br><strong>let<\/strong> dest = \"https:\/\/example.com?\" + getParametersAsString(wixLocation.url);<br><strong>if<\/strong> (!isFacebookBot()) setTimeout(() =&gt; { wixLocation.to(dest); }, 300));<br>$w.onReady(<strong>function<\/strong> () {<br>&nbsp;&nbsp;&nbsp;&nbsp;$w(\"#image1\").onClick((event) =&gt; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wixLocation.to(dest);<br>&nbsp;&nbsp;&nbsp;&nbsp;});<br>&nbsp;&nbsp;&nbsp;&nbsp;\/\/End of handler<br>});<\/code><\/p>\n\n\n<section class=\"ywb-related-reading\" aria-label=\"What to read next\">\r\n        <div class=\"ywb-related-reading__inner\">\r\n            <h2 class=\"ywb-related-reading__title\">What to read next<\/h2>\n            <p class=\"ywb-related-reading__hub-note\">\n                <a class=\"ywb-related-reading__hub-link\" href=\"https:\/\/yellowweb.top\/en\/en\/poleznye-materialy-po-arbitrazhu-trafika\/#hub-landings-cloaking\">Open the full traffic arbitrage hub \u2192<\/a>\n            <\/p>\n            <div class=\"ywb-related-reading__grid\">\r\n                                                        <a class=\"ywb-related-reading__card\" href=\"https:\/\/yellowweb.top\/en\/en\/submetki-makrosy-postbeki-i-votetovotvsyo\/\">\n                        <span class=\"ywb-related-reading__card-title\">Sub IDs, Macros, Postbacks, and All That Stuff<\/span>\n                        <span class=\"ywb-related-reading__card-text\">\u0421\u0443\u0431\u043c\u0435\u0442\u043a\u0438, \u043c\u0430\u043a\u0440\u043e\u0441\u044b \u0438 \u043f\u043e\u0441\u0442\u0431\u044d\u043a\u0438 \u0431\u0435\u0437 \u0445\u0430\u043e\u0441\u0430.<\/span>\n                    <\/a>\n                                                        <a class=\"ywb-related-reading__card\" href=\"https:\/\/yellowweb.top\/en\/en\/delaem-universalnuyu-straniczu-spasibo\/\">\n                        <span class=\"ywb-related-reading__card-title\">Build a Universal Thank-You Page<\/span>\n                        <span class=\"ywb-related-reading__card-text\">\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u043f\u043e\u0434 \u0442\u0440\u0435\u043a\u0438\u043d\u0433.<\/span>\n                    <\/a>\n                                                        <a class=\"ywb-related-reading__card\" href=\"https:\/\/yellowweb.top\/en\/en\/dinamicheskij-piksel-probros-pikselya-facebook-na-straniczu-spasibo\/\">\n                        <span class=\"ywb-related-reading__card-title\">Dynamic Facebook Pixel: Setup and Event Passing<\/span>\n                        <span class=\"ywb-related-reading__card-text\">\u041f\u0438\u043a\u0441\u0435\u043b\u044c \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b URL.<\/span>\n                    <\/a>\n                            <\/div>\r\n        <\/div>\r\n    <\/section>","protected":false},"excerpt":{"rendered":"<p>How to pass sub IDs through a Wix-based page when tracking continuity matters and you do not control a custom stack.<\/p>","protected":false},"author":2,"featured_media":1144,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18,30,14],"tags":[],"class_list":["post-1137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloaking","category-landings","category-facebook"],"_links":{"self":[{"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/posts\/1137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/comments?post=1137"}],"version-history":[{"count":3,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/posts\/1137\/revisions"}],"predecessor-version":[{"id":1754,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/posts\/1137\/revisions\/1754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/media\/1144"}],"wp:attachment":[{"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/media?parent=1137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/categories?post=1137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yellowweb.top\/en\/wp-json\/wp\/v2\/tags?post=1137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}