Isabella Fenwick writes in her Notes of William Wordsworth recollections:

In the spring of the year 1798, he [Coleridge], my Sister, & myself, started from Alfoxden, pretty late in the afternoon, with a view to visit Linton and the Valley of Stones near it; and as our united funds were very small, we agreed to defray the expense of the tour by writing a Poem to be sent to the New Monthly Magazine set up by Phillips the Bookseller, and edited by Dr. Aikin. Accordingly we set off and proceeded along the Quantock Hills, towards Watchet, and in the course of this walk was planned the poem of the Ancient Mariner, founded on a dream, as Mr. Coleridge said, of his friend, Mr. Cruikshank. Much the greatest part of the story was Mr. Coleridge’s invention; but certain parts I myself suggested, for example, some crime was to be committed which should bring upon the Old Navigator, as Coleridge afterwards delighted to call him, the spectral persecution, as a consequence of that crime, and his own wanderings. I had been reading in Shelvocke’s Voyages a day or two before that while doubling Cape Horn they frequently saw albatrosses in that latitude the largest sort of seafowl, some extending their wings 12 or 13 feet. “Suppose”, said I, “you represent him as having killed one of these birds on entering the South Sea, and that the tutelary Spirits of these regions take upon them to avenge the crime”. The incident was thought fit for the purpose and adopted accordingly. I also suggested the navigation of the ship by the dead men, but do not recollect that I had anything more to do with the scheme of the poem. The gloss with which it was subsequently accompanied was not thought of by either of us at the time, at least not a hint of it was given to me, & I have no doubt it was a gratuitous afterthought. We began the composition together on that to me memorable evening: I furnished two or three lines at the beginning of the poem, in particular

And listened like a three years’ child;
        The Mariner had his will.

These trifling contributions, all but one (which Mr. C. has with unnecessary scrupulosity recorded) slipt out of his mind as they well might. As we endeavoured to proceed conjointly (I speak of the same evening) our respective manners proved so widely different that it would have been quite presumptuous in me to do anything but separate from an undertaking upon which I could only have been a clog. We returned after a few days from a delightful tour, of which I have many pleasant, and some of them droll-enough, recollections. We returned by Dulverton to Alfoxden. The Ancient Mariner grew and grew till it became too important for our first object, which was limited to our expectation of five pounds, and we began to talk of a volume, which was to consist as Mr. Coleridge has told the world, of Poems chiefly on supernatural subjects taken from common life but looked at, as much as might be, through an imaginative medium.

And although Wordsworth came to doubt whether Lyrical Ballads was the best home for the poem, there is no doubt that he remembered its composition with affection, for at the end of The Prelude (“the Poem to Coleridge” as he always called it), he writes

“Quantock’s airy ridge”

                      ...but, beloved Friend!
When, looking back, thou seest, in clearer view
Than any liveliest sight of yesterday,
That summer, under whose indulgent skies,
Upon smooth Quantock’s airy ridge we roved
Unchecked, or loitered ’mid her sylvan combs,
Thou in bewitching words, with happy heart,
Didst chaunt the vision of that Ancient Man,
The bright-eyed Mariner...

(The Prelude (1850), XIV, 392-400)