hello kudos,

I am using contact form 7 and want to set up the calltrackmetrics but unable to find documentation.



1 comment
  • I would recommend using this plugin -

    Then you could setup a webhook to send data to your code/Zapier/Integromat/Pipedream etc... and generate a request that will add that lead into CTM.

    There is one thing you must make sure of, you need to add a hidden field and inject the sid (session id) into it so when you send your request it will be included thus attributing that specific lead with an online session.

    Usually what I do when it comes to wordpress is just add something like this to the cf7 form (make sure its placed above the submit button:

    <span style="display:none;">[text sid class:sid]</span>

    On CTM side, in order to inject the value into that field I add some custom code, all you need to do is go to Numbers/Tracking Code and scroll all the way to the bottom, then you can paste this short script:

    var swapStatus = false;
    window.CTMSourceEvent = function(event) {
    if (event.state == "after"){
    if (!swapStatus){
    if (document.querySelector("input[name='sid']")){
    var forms = document.querySelectorAll("input[name='sid']");
    for (i=0;i<forms.length;i++){
    forms[i].setAttribute("value", __ctm.config.sid);
    swapStatus = true;

    And that should be it. If you have any issues, just let me know and I will be happy to help.


Please sign in to leave a comment.

Didn't find what you were looking for?

New post