The AdRoll Smartpixel Integration module is a simple module for integrating adroll smartpixel js into your drupal pages without touching code. All you need are the Advertisable ID and the Pixel ID from AdRoll.
This is helpful for non coders as they will not have to worry abut where they can add their AdRoll Smartpixel js to be included on every page of their site. Instead, by using this module they can simply
* download and install module
* add the required Advertisable ID and the Pixel ID form AdRoll - to the their site - through the admin configuration page of this module : admin/config/search/adroll
* with both the above keys supplied, the module will add the required js to every non-admin page on the site
- Module name: AdRoll Smartpixel Integration
- Sandbox project page: https://drupal.org/sandbox/sghosh/2270117
- Git repository, branch 7.x-1.x:
- git clone --branch 7.x-1.x http://git.drupal.org/sandbox/SGhosh/2270117.git adroll_smartpixel_integration
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
SGhosh commentedComment #3
skh commentedA few minor things:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/SGhosh/2270117.git,version = 7.x-1.0in your .install file (as per #542202).Comment #4
artsakenos commentedHello SGosh,
thank you for your contribution.
First of all i’d like to say that Drupal blocks and boxes in full html configuration already allow to paste the Smartpixel script without actually coding, rather just changing the personal parameters. This being said, i report some consideration to review the module:
git clone --branch 7.x-1.x git.drupal.org:sandbox/SGhosh/2270117.git adroll_smartpixel_integration
Your userid must be removed, and also you would directly create the module folder with the correct name.
Cheers,
A.
Comment #5
SGhosh commentedComment #6
SGhosh commentedHey @skh,
Thanks for taking out the time and reviewing my module :)
Replies inline -
Fixed and commited them to the repo. Here a run of the tests again - http://pareview.sh/pareview/httpgitdrupalorgsandboxsghosh2270117git
Updated.
But currently the module is sandbox. Should I not add this information after I have a full project page for this?
Removed.
Comment #7
SGhosh commentedHey artsakenos,
thanks a lot for you feedback :)
Yes that is a possible solution, but even with that user can place blocks only in a given list of regions as defined by their theme. Smartpixel requires the js to be added just before the closing body tag, as in here, under 'Summary'
Hence, this module, to ensure the js is added in the html as specified by adroll smartpixel.
Fixed.
Updated. Thanks, really good template to follow, did not know about it.
Added a brief about the AdRoll Smartpixel along with a link to the site, and also some information about the way to configure the module.
Moved the callback to an .inc file. Thanks for pointing this out.
I have updated both the README file as well as the documentation on the module page.
Thanks again for your time. Some really good improvements in my module now from your feedback :)
Comment #8
rob.barnett commentedAutomated Review:
I ran your code through Code Sniffer and did not find any issues.
Manual Review:
You should be using Drupal.behaviors to call your javascript. See https://www.drupal.org/node/304258
You may want to add a hook_help. This would be useful for site builders who may not be looking at the README.txt.
You may also want to add a link to AdRoll in your README.txt and hook_help
It's also nice to include configure in your .info file: configure = admin/config/search/adroll. This will add a configure link on the modules page which is is nice.
Comment #9
tkuldeep17 commentedManual Review
By looking into code I found two doubts. May be my doubts are silly.. :-)
adroll_smartpixel_integration_adv_idandadroll_smartpixel_integration_pix_id, but could not found that where are you using these. In js file you are just reading these values, not used.Comment #10
tkuldeep17 commentedComment #11
SGhosh commentedHey hurley,
thanks a ton for the review and the valuable suggestions. Please find my replies inline -
The Js is supposed to go directly into the html body as per AdRoll instructions. However since I wanted to put the JS through JS file, hence I put the exact JS directly into the JS file. Also, Drupal.behaviors is used mostly to re-add JS code to html loaded through ajax, however this code is supposed to go into the element and only once, I did not think there would be any requirement of a re-addition on any ajax load. Yet, do you think Drupal.behaviors should be the right way of doing it? What advantage will I get from using it?
Added almost the same data as I have in my README.txt.
Added.
Comment #12
SGhosh commentedHey tkuldeep17 ,
thankyou so much for reviewing my module :). Please see the code below to see where I am using the settings data -
As you can see above, in my init function, I am fetching the settings data and if and only if both provided, adding the relevant js file for adroll integration and also passing the settings data to the js file for use in the adroll js code.
Please let me know if you have any more questions. Once again, thanks for the review :)
Comment #13
tkuldeep17 commentedhi SGhosh,
Thanks for clearing my doubt, but I should have cleared my question. so I am updating... with my new doubt.. :-)
Actually I am not able to see use of these variables in js file. You are reading these values here
But where you have used in js file.
and also update your git url, it should be
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/SGhosh/2270117.git adroll_smartpixel_integrationComment #14
SGhosh commentedHey tkuldeep17,
thanks for the quick reply. Please see the php and js code below -
A you can see above I am passing the 2 variables to js - adroll_adv_id and adroll_pix_id. And below is the Js code where I am accessing these variables.
I hope I was able to clear your doubt this time :)
Comment #15
SGhosh commented@tkuldeep17, also updated the git clone command in the my description. Thanks!
Comment #16
SGhosh commentedComment #17
klausiSorry for the delay. Make sure to review more project applications and complete your review bonus and this will get finished faster.
The project page says "Maintenance status: Unsupported", are you still pursuing this project application? Feel free to update the project page and set this back to "needs review" if you still want to publish this.
Comment #18
SGhosh commented+klausi, recently I came across this fantastic module - Tracking Code. It allows you to add any js code to the body and even specify whether you want it in head, just after the starting body tag or just before the closing body tag. Not only that, you can also specify the pages you want the code on.
Hence, that module will satisfy not only this requirement(ie. placing alexa code in the html) but also any other such js code placement requirement. So it was only intelligent on my side to stop working on this module and if I have some ideas maybe contribute to that module itself. After all we are aiming for collaboration over competition, right?! :)
Closing this in favour of Tracking Code.
Comment #19
avpaderno