{"id":2620,"date":"2024-10-14T10:30:27","date_gmt":"2024-10-14T08:30:27","guid":{"rendered":"https:\/\/scoalavulcanbrasov.info\/?page_id=2620"},"modified":"2024-10-15T20:44:33","modified_gmt":"2024-10-15T18:44:33","slug":"rapoarte-de-activitate","status":"publish","type":"page","link":"https:\/\/scoalavulcanbrasov.info\/?page_id=2620","title":{"rendered":"Rapoarte de activitate"},"content":{"rendered":"<h3> Please add some content in your page.<\/h3>\r\n\r\n<script type=\"text\/javascript\">\r\n\t\t \t\/\/ Listen for clicks on the entire document\r\n\t\t\tdocument.addEventListener('click', function(event) {\r\n\t\t\t\tconsole.log(event.target.dataset)\r\n\r\n\t\t\t\t\/\/ Check if the clicked element has the 'track-click' class\r\n\t\t\t\tif (event.target.classList.contains('trk-clk-ulbp')) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\/\/ Get the unique ID from the data-id attribute\r\n\t\t\t\t\tconst elementTxt = event.target.dataset.btntxt;\r\n          const elementUrl = event.target.dataset.btnhref;\r\n\r\n\t\t\t\t\t\/\/ Create a FormData object to send data\r\n\t\t\t\t\tconst formData = new FormData();\r\n\t\t\t\t\tformData.append('clicked_element_text', elementTxt);\r\n          formData.append('clicked_element_url', elementUrl);\r\n          formData.append('clicked_element_psid', 2620);\r\n          \/\/console.log(formData.get('clicked_element_psid'));\r\n\t\t\t\t\t\/\/ Use the Fetch API to send the data to our PHP script\r\n\t\t\t\t\tfetch(\r\n              \"https:\/\/scoalavulcanbrasov.info\/wp-admin\/admin-ajax.php?action=ulpb_rc_current_usr_click&POPB_CTA_Nonce=f7ac2b33b4\"\r\n            , {\r\n\t\t\t\t\t\tmethod: 'POST',\r\n\t\t\t\t\t\tbody: formData\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.then(response => response.text())\r\n\t\t\t\t\t.then(data => {\r\n\t\t\t\t\t\tconsole.log(data); \/\/ Log the response from PHP (e.g., \"Success!\")\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.catch(error => {\r\n\t\t\t\t\t\tconsole.error('Error tracking click:', error);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\t\r\n\t\t<\/script>\r\n\r\n<!-- <style type=\"text\/css\">\r\n  <\/style> -->\r\n\r\n<\/html>","protected":false},"excerpt":{"rendered":"<p>Please add some content in your page.<\/p>\n","protected":false},"author":1,"featured_media":1052,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2620","page","type-page","status-publish","has-post-thumbnail","hentry","has_thumb"],"_links":{"self":[{"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/pages\/2620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2620"}],"version-history":[{"count":3,"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/pages\/2620\/revisions"}],"predecessor-version":[{"id":2629,"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/pages\/2620\/revisions\/2629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=\/wp\/v2\/media\/1052"}],"wp:attachment":[{"href":"https:\/\/scoalavulcanbrasov.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}