RD Station via Javascript

If you want to manually send data to the Rd station By Javascript, a simple way is to use the integration script that has its own method for submission, simplifying the process and making it unnecessary to create a request via custom AJAX.

The minimum required code would be as follows:

RdIntegration.post ([{name: 'email', value: 'Desired Email'}}, {name: 'identifier', value: 'How the conversion appears in RD Station'}, {name: 'token_rdstation', value: ' SEUTOKENPUBLICO '}, {name:' name ', value:' Desired Name}], null);

Here is a more complete example (using jQuery):

$ (document) .ready (function () {$ ("# send-rd"). click (function (event) {event.preventDefault (); var data_array = [{name: 'email', value: $ (" # email-rd "). val ()}, {name: 'identifier', value: 'How the conversion appears on RD Station'}, {name: 'token_rdstation', value: 'YOURPUBLIC'}, {name: ' name ', value: $ ("# rd -name"). val ()}]; RdIntegration.post (data_array, function () {alert ("Data sent successfully!")});}});

The above code captures the data from the # email-rd and # name-rd inputs and sends the POST to the click of the # send-rd button, and after sending, uses the callback of RdIntegration's own method to display an alert.

The code presented has no validation, which is necessary to keep your lead base clean, so it should only serve as an example to elaborate. Also remembering that this code necessarily needs to be executed after the RD Station integration script. I also leave below a slightly more elaborate JSFiddle.

unsplash-logoMarten bjork

Got a question? Leave a comment! I often answer the same day.


Comments

3 responses to “RD Station via Javascript”

  1. Eu posso colocar qualquer name no envio dos dados ao RD?
    Como sei o que posso colocar? Por exemplo, e se eu quiser mandar o sobrenome pro RD?
    {
    name: ‘sobrenome’,
    value: $(“#sobrenome-rd”).val()
    }

    Isso funcionaria?

    ________________________________________________
    {
    name: ‘Sobrenome’,
    value: $(“#sobrenome-rd”).val()
    }

    Isso mudaria algo?

    1. Contando que você tenha o campo com esse valor, sim sem problemas, basta mapear no RD.

  2. tenho um caso que está chegando com duplicidade, a varredura do script do RD detecta automaticamente o envio, e se desejo tratar este envio e utilizar o código acima eu tenho lead duplicado chegando no rd.
    Como posso evitar isso?

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish