When you join the iFrame Reseller Program at Name.com you'll be provided with two blocks of code and a unique partner ID that you will copy and paste onto your website. Once you've placed the provided code snippets on your site, you will see the initial Name.com Domain Search bar showing in your iFrame.
Important: Remember to copy and paste the provided blocks of code onto your site
1. Copy and Paste the Meta Tag
Copy and paste your <meta>
tag into the header of your website where the iFrame will be displayed.
<META http-equiv="Content-Security-Policy" content="frame-src iframe.name.com">
2. Generating your Unique iFrame Code
Complete this form to complete your request that our team to generate your iFrame code for implementation.
3. Copy and Paste your iFrame Code
Copy and paste your unique <iframe>
code onto the page of your website where the iFrame will be displayed. Your iFrame is unique and will only work on the webpage it was generated for during signup. If you need to move your iFrame to a new website you'll need to generate a new Reseller iFrame in a new Name.com Account.
<iframe src="https://iframe.name.com/domain/search?partner_id=YOUR_ID&key=YOUR_KEY"></
4. Advanced Setup - Access Order Data from iFrame Checkout
You can choose to capture some order details from the iFrame orders and use it for setup and configuration in your app or website with the window.postMessage() method.
Upon order completion, order data is posted to parent window and you can use a code snippet like the one below to do something with the data.
/* Capture order sent from iframe.dev.name.com */ // Called sometime after postMessage is called window.addEventListener("message", (event) = { // Do we trust the sender of this message? if (event.origin !== "https://iframe.dev.name.com") return; // event.source is window.opener // event.data is "hello there!" var orders = event.data; if (orders.length){ //grab domain name, etc. } });
0 Comments