How do I populate data in intercom custom attributes from segment? - segment

Segment offers page method call, where you can track the previous URL of a visitor prior to coming on your website.
I have this referrer URL with me, I want to push this referrer URL to intercom.
What I really want to do?
Whenever a user signs up on our software, I want to track his previous URL and make it available in intercom under his profile.
Also, the custom attribute created in intercom by me is not working since I don't know what code I should write in my intercom code snippet.
Please refer screenshots.
Intercom
Segment

Intercom by default saves the Referral URL of the user in a field called Referral url.
Else if you want to manually push referrer URL as a custom attribute you can send the parameter in the following way:
Intercom('boot', {
app_id: '<<Your App ID>>',
referrer:document.referrer, //custom attribute id which you have created in intercom
});

Related

Laravel create and store failure

I have a resource controller and create page. I need add some resources via store function. The store post url is xxx/xxx. Create get url is xxx/xxx/create. How can i post something via create url? Store post does have to be like xxx/xxx/create?
(Sorry for bad grammar)

how to add additioanla parameter in referral URL in Magento

I want to add additional parameter in referral URL. in Magento when I add item to compare list, it successfully added and then it redirect to referral URL. while going back to referral URL i want to add some additional parameters in the URL.
$this->_redirectReferer(); if i call the function it redirects the previous page. for example it redirects to http://magento.com/product.html
instead of this i want to redirect to http://magento.com/product.phtml/?timestamp
basically i want to add some additional parameter in my referral URL.

wordpress: how to force a form fill before going to a page?

I am building a wordpress site with this requirement: when the user attempts to navigate to certain pages, they will be forced to fill out a small form (enter their email address) before they can get to the desired page.
On a standalone site, I'd do it like this: on each "protected" page, I'd look for a cookie named "email". If this cookie doesn't exist, redirect to an email capture page, along with a url parameter indicating the page to go to after they enter their email. The email form would call a PHP script that would set the "email" cookie, then redirect to the desired page
How to do this in wordpress? Would I create my cookie testing code in a template and assign that to the protected pages?
Create a template and page for your php code and when user try to navigate to protected pages check for cookie if doesnt exist go to email page (instead it would be fine if the form appears in a pop up window).There when you get the email onsubmit use ajax to go create cookie from php page and once the cookie is set the navigation should take place .you should create a template for the php page ,and give the page id in ajax code
I hope this is what u r looking for.

How to link a specific store view in Magento from outside the store?

I have Magento set up in a multi-language store so that every language has its own store view. I have an HTML landing page where users choose the language they want, and I want to link each store view from the landing page.
I need to create a URL for each specific view so that it can be accessed from the landing page (like my_magento_installation.com/spanish, etc.), outside of the Magento installation. That means that I can't use any core code to get the store view.
I noticed that this URL format:
http://www.my_magento_installation.com/?___store=view_name
...is shown in the URL bar after selecting a specific store view from the default dropdown in Magento. However, if I set up a link with this format from outside the Magento installation, it just redirects to the base URL (www.my_magento_installation.com)
Thanks in advance,
Pau
Pul Vila,here the soap list using soap client of magento list ,for referece here http://www.magentocommerce.com/api/soap/miscellaneous/store.list.html
after using htaccess write url of landing page...https://stackoverflow.com/questions/21433203/donot-want-show-magento-home-using-htaccess-file

Magento ignores extra URL parameters set

I am trying to open a Magento store link from an external site. While opening the store link I need to send some information using the query string parameters.
So I open a link (through php code) such as:
http://magentostore.com/myproduct.html?id=3434&user=445
However the Magento store link ignores the query string parameters and reloads the page as:
magentostore.com/myproduct.html
I checked in Firebug and can see that there was a redirect to the Magento store without the query string parameters. Is there a way to override this behavior and let Magento load with the query string parameters?
What setting can I do in the Magento store to let it allow using the query string parameters?
Is there any other way of sending some more information to the Magento store page?
Is there a way to find out if its Magento doing this and not the server?
Thanks
Magento is receiving the queries on the first request but redirects to the URL it has in the URL Rewrite list. This is probably for SEO reasons. Whatever code you have that needs those values should store them in a session variable before the redirect happens.
deveffort says:
I researched for the URL rewrites and looks like there was a URL redirect for the product link! I have removed it and have my scenario working. However would be great to know if there is anything that can be done to make sure the Magento code does not do any query string parameter sanitization. Thanks a lot..
clockworkgeek says:
I fear removing that rewrite is temporary. It will replace itself on the next product re-index or perhaps when the product is saved. Since you only want to set some cookies it needn't be done by javascript, that is less reliable anyway.
Instead, create an observer to watch for an event of catalog_controller_product_view. Have the observer check for the query parameters, and if the correct one exists, set the cookie. Also it might try checking the referrer URL matches what you expect of it, that might make spoofing the values a little harder.

Resources