{"id":8598,"date":"2024-10-24T15:57:28","date_gmt":"2024-10-24T15:57:28","guid":{"rendered":"https:\/\/nam.extended-developments.com\/?p=8598"},"modified":"2024-11-25T14:57:01","modified_gmt":"2024-11-25T14:57:01","slug":"cpm","status":"publish","type":"post","link":"https:\/\/nam.extended-developments.com\/nl\/cpm\/","title":{"rendered":"CPM"},"content":{"rendered":"<!DOCTYPE html>\n<html>\n<head>\n  <title>CPM Calculator<\/title>\n  <style>\n  body {\n    font-family: 'Lato', Arial, sans-serif;\n  }\n\n\n\n  form {\n    border: 1px solid #ccc;\n    padding: 10px;\n    border-radius: 5px;\n  }\n\n  label {\n    font-weight: bold;\n    font-size: 14px;\n    color: #000;\n  }\n\n  button {\n    margin-top: 10px;\n    background-color: #FCC100;\n    color: white;\n    border: none;\n    padding: 8px 16px;\n    text-align: center;\n    text-decoration: none;\n    display: inline-block;\n    font-size: 14px;\n    border-radius: 27px;\n    cursor: pointer;\n    font-family: 'Lato', Arial, sans-serif;\n    font-weight: bold;\n  }\n\n  \/* Custom styles for tablet devices *\/\n  @media (max-width: 768px) {\n    form {\n      max-width: 100%;\n    }\n    label, input, button {\n      font-size: 16px;\n      font-weight: normal;\n    }\n  }\n\n  \/* Custom styles for mobile devices *\/\n  @media (max-width: 480px) {\n    form {\n      max-width: 100%;\n    }\n    label, input, button {\n      font-size: 14px;\n      font-weight: bold;\n    }\n  }\n<\/style>\n<\/head>\n<body>\n  <div style=\"max-width: 100%; margin: 0px;\">\n    <h3>Enter Your Data Below<\/h3>\n    <form action=\"\">\n      <div style=\"display: flex; flex-direction: column; margin-bottom: 10px;\">\n        <label for=\"impressions\">Impressions:<\/label>\n        <input type=\"number\" id=\"impressions\" name=\"impressions\" required>\n      <\/div>\n\n      <div style=\"display: flex; flex-direction: column; margin-bottom: 10px;\">\n        <label for=\"cost\">Cost:<\/label>\n        <input type=\"number\" id=\"cost\" name=\"cost\" step=\"0.01\" required>\n      <\/div>\n\n      <div style=\"display: flex; flex-direction: column; margin-bottom: 10px;\">\n        <label for=\"currency\">Currency:<\/label>\n        <select id=\"currency\" onchange=\"calculateCPM()\">\n          <option value=\"usd\">USD<\/option>\n          <option value=\"euro\">Euro<\/option>\n        <\/select>\n      <\/div>\n\n      <button type=\"button\" onclick=\"calculateCPM()\">Calculate CPM<\/button>\n\n      <div style=\"display: flex; flex-direction: column; margin-top: 10px;\">\n        <label for=\"cpm\">CPM (Cost Per Thousand Impressions):<\/label>\n        <input type=\"text\" id=\"cpm\" readonly>\n      <\/div>\n    <input type=\"hidden\" name=\"trp-form-language\" value=\"nl\"\/><\/form>\n  <\/div>\n\n  <script>\n    function calculateCPM() {\n      \/\/ Get the values of impressions and cost\n      const impressions = parseFloat(document.getElementById(\"impressions\").value);\n      const cost = parseFloat(document.getElementById(\"cost\").value);\n      const currency = document.getElementById(\"currency\").value;\n\n      \/\/ Check if both values are valid numbers\n      if (!isNaN(impressions) && !isNaN(cost)) {\n        \/\/ Calculate CPM (Cost Per Thousand Impressions)\n        const cpm = (cost \/ impressions) * 1000;\n\n        \/\/ Display the result with the selected currency\n        document.getElementById(\"cpm\").value = cpm.toFixed(2) + \" \" + currency.toUpperCase();\n      } else {\n        \/\/ If the input values are not valid, display an error message or handle it as needed.\n        document.getElementById(\"cpm\").value = \"Invalid input\";\n      }\n    }\n  <\/script>\n<\/body>\n<\/html>","protected":false},"excerpt":{"rendered":"<p>Bereken de kosten per duizend impressies in advertentiecampagnes.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[7],"tags":[],"wf_post_folders":[8],"class_list":["post-8598","post","type-post","status-publish","format-standard","hentry","category-tools"],"acf":[],"_links":{"self":[{"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/posts\/8598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/comments?post=8598"}],"version-history":[{"count":3,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/posts\/8598\/revisions"}],"predecessor-version":[{"id":10922,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/posts\/8598\/revisions\/10922"}],"wp:attachment":[{"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/media?parent=8598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/categories?post=8598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/tags?post=8598"},{"taxonomy":"wf_post_folders","embeddable":true,"href":"https:\/\/nam.extended-developments.com\/nl\/wp-json\/wp\/v2\/wf_post_folders?post=8598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}